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

feat: deploy and manage a local instance #184

Merged
merged 9 commits into from
Sep 29, 2023

Conversation

TobiaszCudnik
Copy link
Contributor

@TobiaszCudnik TobiaszCudnik commented Sep 28, 2023

Because

  • user should be able to spin up a local instance

This commit

  • adds deployment, management and auth (INS-1659) for a single local instance
$ instill local --help
Create and manage a local Instill Core instance with ease.

USAGE
  instill local <command> [flags]

CORE COMMANDS
  deploy:     Deploy a local Instill Core instance
  start:      Start a local Instill Core instance
  status:     Status of the local deployment
  stop:       Stop a local Instill Core instance

INHERITED FLAGS
  --help   Show help for command

LEARN MORE
  Use 'instill <command> <subcommand> --help' for more information about a command.
  Read the manual at https://docs.instill.tech

@linear
Copy link

linear bot commented Sep 28, 2023

INS-1760 CLI: deploy a local Core instance

  • $ inst local deploy --path PWD --branch main
  1. git clone vdp
  2. local start
  3. instaces add localhost:3000
  • $ inst local start --deploy
  1. (opt) local deploy when --deploy
  2. make all
  3. local check
  • $ inst local stop --destroy
  1. make stop
  2. (opt) make down when --destroy
  3. (opt) instaces add localhost:3000
  • $ inst local check --verbose
  1. :8080/vdp/v1alpha/health/pipeline
  2. :8080/base/v1alpha/health/mgmt
  3. :8080/vdp/v1alpha/health/connector
  4. :3000/
  5. (opt) make top

@TobiaszCudnik TobiaszCudnik changed the title Tobias/ins 1760 cli deploy a local core instance feat: deploy and manage a local instance Sep 28, 2023
@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Attention: 240 lines in your changes are missing coverage. Please review.

Comparison is base (d01761f) 50.86% compared to head (23e1baa) 51.20%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #184      +/-   ##
==========================================
+ Coverage   50.86%   51.20%   +0.34%     
==========================================
  Files          54       59       +5     
  Lines        4215     4712     +497     
==========================================
+ Hits         2144     2413     +269     
- Misses       1852     2020     +168     
- Partials      219      279      +60     
Flag Coverage Δ
unittests 51.20% <53.39%> (+0.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
api/client.go 7.54% <0.00%> (ø)
pkg/cmd/root/root.go 0.00% <0.00%> (ø)
pkg/cmd/version/version.go 59.25% <0.00%> (-2.28%) ⬇️
pkg/cmdutil/output.go 0.00% <0.00%> (ø)
internal/instance/host.go 75.00% <0.00%> (+9.37%) ⬆️
pkg/cmd/instances/add.go 63.29% <36.84%> (-7.73%) ⬇️
pkg/cmd/local/start.go 60.71% <60.71%> (ø)
pkg/cmd/local/stop.go 60.71% <60.71%> (ø)
pkg/cmd/local/local.go 38.63% <38.63%> (ø)
pkg/cmd/auth/login/login.go 32.87% <30.61%> (-1.15%) ⬇️
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TobiaszCudnik TobiaszCudnik force-pushed the tobias/ins-1760-cli-deploy-a-local-core-instance branch from 005124d to bb94015 Compare September 28, 2023 08:42
@TobiaszCudnik TobiaszCudnik marked this pull request as ready for review September 28, 2023 09:04
@TobiaszCudnik TobiaszCudnik force-pushed the tobias/ins-1760-cli-deploy-a-local-core-instance branch from 91a980f to 625c54e Compare September 28, 2023 15:54
- `start`
- `stop`
- `status`
- utils

Signed-off-by: Tobias Cudnik <[email protected]>
- dedicated local auth
- tests
- make fixes

Signed-off-by: Tobias Cudnik <[email protected]>
Signed-off-by: Tobias Cudnik <[email protected]>
Signed-off-by: Tobias Cudnik <[email protected]>
Signed-off-by: Tobias Cudnik <[email protected]>
@pinglin pinglin force-pushed the tobias/ins-1760-cli-deploy-a-local-core-instance branch from 625c54e to a34048d Compare September 28, 2023 17:50
Copy link
Member

@pinglin pinglin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fatal error causing the local deployment failed. I will try to solve this on my side.

pkg/cmd/local/deploy.go Outdated Show resolved Hide resolved
@pinglin pinglin force-pushed the tobias/ins-1760-cli-deploy-a-local-core-instance branch 3 times, most recently from 4d5e448 to 5b3d65d Compare September 29, 2023 03:54
@pinglin pinglin force-pushed the tobias/ins-1760-cli-deploy-a-local-core-instance branch from 5b3d65d to bae0d1a Compare September 29, 2023 04:04
@pinglin pinglin force-pushed the tobias/ins-1760-cli-deploy-a-local-core-instance branch from bae0d1a to 23e1baa Compare September 29, 2023 04:08
}
dir := filepath.Join(pwd, "instill-core") + string(os.PathSeparator)
dir := filepath.Join(d, ".config", "instill") + string(os.PathSeparator)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an incorrect location, it should be in .local or .cache.

@TobiaszCudnik TobiaszCudnik merged commit 8eeca4b into main Sep 29, 2023
@TobiaszCudnik TobiaszCudnik deleted the tobias/ins-1760-cli-deploy-a-local-core-instance branch September 29, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants