Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add local-up.sh #26

Merged
merged 1 commit into from
Jan 28, 2021
Merged

Add local-up.sh #26

merged 1 commit into from
Jan 28, 2021

Conversation

llhuii
Copy link

@llhuii llhuii commented Jan 12, 2021

Developers can run hack/local-up.sh to setup up a local environment
including:

  1. a local k8s cluster with a master node.
  2. a kubeedge node.
  3. our gm/lc.

Based on the kubeedge-local-up script which builds a local k8s cluster
and kubeedge, our local-up script installs our package locally for
simply developing and preparing for e3e tests.

It does:

  1. build the gm/lc/worker images.
  2. download kubeedge source code and run its localup script.
  3. prepare our k8s env.
  4. config gm config and start gm.
  5. start lc.
  6. add cleanup.

For cleanup, it needs to do our cleanups before kubeedge cleanup
otherwise lc cleanup (via kubectl delete) is stuck and lc container is
kept running.

@llhuii llhuii mentioned this pull request Jan 12, 2021
@llhuii llhuii marked this pull request as draft January 12, 2021 02:39
@llhuii
Copy link
Author

llhuii commented Jan 12, 2021

wait this kubeedge/kubeedge#2495 to merged.

@llhuii
Copy link
Author

llhuii commented Jan 13, 2021

Now since we builds images locally, we only can start gm at edgenode(at which edgecore running locally).

TODO: deploy gm to test-control-plane master node which are created by kind .

Found a way to deploy gm image to test-control-plane : kubernetes-sigs/cri-tools#546.

docker save localhost/edgeai-neptune/neptune/gm:localup | docker exec -i test-control-plane ctr --namespace k8s.io image import - 

@llhuii
Copy link
Author

llhuii commented Jan 14, 2021

with setsid command, we can handle our cleanups before cleanup kubeedge.

@llhuii llhuii force-pushed the add-localup-script branch 4 times, most recently from 4b2cb6c to f2d1d99 Compare January 15, 2021 03:42
@llhuii llhuii marked this pull request as ready for review January 15, 2021 03:45
@llhuii
Copy link
Author

llhuii commented Jan 18, 2021

docker save localhost/edgeai-neptune/neptune/gm:localup | docker exec -i test-control-plane ctr --namespace k8s.io image import - 

just use kind load docker-image command.

@llhuii llhuii force-pushed the add-localup-script branch 2 times, most recently from 5f3144a to dacc80d Compare January 20, 2021 08:23
@llhuii llhuii marked this pull request as draft January 25, 2021 09:32
@llhuii llhuii force-pushed the add-localup-script branch 2 times, most recently from 1b7f10f to 567c2a3 Compare January 28, 2021 06:26
@llhuii llhuii marked this pull request as ready for review January 28, 2021 06:36
@llhuii llhuii requested a review from TymonXie January 28, 2021 06:47
@llhuii
Copy link
Author

llhuii commented Jan 28, 2021

  1. updated with some updates merging Optimize installation docs #48.
  2. add neptune-lc manually clean in case edgecore terminated unexpected.

Developers can run `hack/local-up.sh` to setup up a local environment
including:
1. a local k8s cluster with a master node.
2. a kubeedge node.
3. our gm/lc.

Based on the kubeedge-local-up script which builds a local k8s cluster
and kubeedge, our local-up script installs our package locally for
simply developing and preparing for e3e tests.

It does:
1. build the gm/lc/worker images.
2. download kubeedge source code and run its localup script.
3. prepare our k8s env.
4. config gm config and start gm.
5. start lc.
6. add cleanup

For cleanup, it needs to do our cleanups before kubeedge cleanup
otherwise lc cleanup (via kubectl delete) is stuck and lc container is
kept running.
@llhuii llhuii merged commit cb3935a into edgeai-neptune:main Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant