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: Rewrite Plugin devlake with Helm Installation #1135

Merged
merged 7 commits into from
Oct 9, 2022

Conversation

daniel-hutao
Copy link
Member

@daniel-hutao daniel-hutao commented Sep 29, 2022

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

  • Update plugin templates with new scaffolding. (dtm develop)
  • Scaffold and implement devlake plugin.

Related Issues

#1136

Test

Apply

$ ./dtm apply -f config-devlake.yaml 
2022-09-30 19:12:20 ℹ [INFO]  Apply started.
2022-09-30 19:12:20 ℹ [INFO]  Using dir </Users/danielhu/.devstream/plugins> to store plugins.
2022-09-30 19:12:20 ℹ [INFO]  Using local backend. State file: devstream.state.
2022-09-30 19:12:20 ℹ [INFO]  Tool (devlake/default) found in config but doesn't exist in the state, will be created.
Continue? [y/n]
Enter a value (Default is n): y

2022-09-30 19:12:22 ℹ [INFO]  Start executing the plan.
2022-09-30 19:12:22 ℹ [INFO]  Changes count: 1.
2022-09-30 19:12:22 ℹ [INFO]  -------------------- [  Processing progress: 1/1.  ] --------------------
2022-09-30 19:12:22 ℹ [INFO]  Processing: (devlake/default) -> Create ...
2022-09-30 19:12:24 ℹ [INFO]  Creating or updating helm chart ...
2022/09/30 19:12:26 creating 9 resource(s)
2022/09/30 19:12:26 beginning wait for 9 resources with timeout of 5m0s
2022/09/30 19:12:26 Deployment is not ready: devlake/devlake-grafana. 0 out of 1 expected pods are ready
...
2022/09/30 19:12:56 StatefulSet is not ready: devlake/devlake-lake. 0 out of 1 expected pods are ready
2022/09/30 19:12:58 release installed successfully: devlake/devlake-0.2.0
2022-09-30 19:12:58 ✔ [SUCCESS]  Tool (devlake/default) Create done.
2022-09-30 19:12:58 ℹ [INFO]  -------------------- [  Processing done.  ] --------------------
2022-09-30 19:12:58 ✔ [SUCCESS]  All plugins applied successfully.
2022-09-30 19:12:58 ✔ [SUCCESS]  Apply finished.

Apply Twice

./dtm apply -f config-devlake.yaml
2022-09-30 19:14:29 ℹ [INFO]  Apply started.
2022-09-30 19:14:29 ℹ [INFO]  Using dir </Users/danielhu/.devstream/plugins> to store plugins.
2022-09-30 19:14:29 ℹ [INFO]  Using local backend. State file: devstream.state.
2022-09-30 19:14:29 ℹ [INFO]  No changes done since last apply. There is nothing to do.
2022-09-30 19:14:29 ✔ [SUCCESS]  Apply finished.

Pod List

kubectl get pod -n devlake                                                                                                                      130 ↵
NAME                               READY   STATUS    RESTARTS   AGE
devlake-grafana-697f776564-cql57   1/1     Running   0          2m57s
devlake-lake-0                     1/1     Running   0          2m57s
devlake-mysql-0                    1/1     Running   0          2m57s
devlake-ui-55c8f98675-7b7gs        1/1     Running   0          2m57s

Delete

./dtm delete -f config-devlake.yaml
2022-09-30 19:16:03 ℹ [INFO]  Delete started.
2022-09-30 19:16:03 ℹ [INFO]  Using dir </Users/danielhu/.devstream/plugins> to store plugins.
2022-09-30 19:16:03 ℹ [INFO]  Using local backend. State file: devstream.state.
2022-09-30 19:16:03 ℹ [INFO]  Tool (devlake/default) will be deleted.
Continue? [y/n]
Enter a value (Default is n): y

2022-09-30 19:16:05 ℹ [INFO]  Start executing the plan.
2022-09-30 19:16:05 ℹ [INFO]  Changes count: 1.
2022-09-30 19:16:05 ℹ [INFO]  -------------------- [  Processing progress: 1/1.  ] --------------------
2022-09-30 19:16:05 ℹ [INFO]  Processing: (devlake/default) -> Delete ...
2022-09-30 19:16:06 ℹ [INFO]  Uninstalling devlake helm chart.
2022/09/30 19:16:06 uninstall: Deleting devlake
2022/09/30 19:16:07 Starting delete for "devlake-mysql" Service
2022/09/30 19:16:07 Starting delete for "devlake-ui" Service
2022/09/30 19:16:07 Starting delete for "devlake-lake" Service
2022/09/30 19:16:07 Starting delete for "devlake-grafana" Service
2022/09/30 19:16:07 Starting delete for "devlake-mysql" StatefulSet
2022/09/30 19:16:07 Starting delete for "devlake-lake" StatefulSet
2022/09/30 19:16:07 Starting delete for "devlake-ui" Deployment
2022/09/30 19:16:07 Starting delete for "devlake-grafana" Deployment
2022/09/30 19:16:07 Starting delete for "devlake-config" ConfigMap
2022/09/30 19:16:07 purge requested for devlake
2022/09/30 19:16:07 release uninstalled, response: &{0x14000792150 }
2022-09-30 19:16:07 ℹ [INFO]  Prepare to delete 'devlake_default' from States.
2022-09-30 19:16:07 ✔ [SUCCESS]  Tool (devlake/default) delete done.
2022-09-30 19:16:07 ℹ [INFO]  -------------------- [  Processing done.  ] --------------------
2022-09-30 19:16:07 ✔ [SUCCESS]  All plugins deleted successfully.
2022-09-30 19:16:07 ✔ [SUCCESS]  Delete finished.

Signed-off-by: Daniel Hu <tao.hu@merico.dev>
Signed-off-by: Daniel Hu <tao.hu@merico.dev>
Signed-off-by: Daniel Hu <tao.hu@merico.dev>
Signed-off-by: Daniel Hu <tao.hu@merico.dev>
Signed-off-by: Daniel Hu <tao.hu@merico.dev>
@daniel-hutao daniel-hutao marked this pull request as ready for review September 30, 2022 10:26
@daniel-hutao daniel-hutao changed the title Feat: Add New Plugin Apache DevLake Feat: Rewrite Plugin devlake with Helm Installation Sep 30, 2022
… config files

Signed-off-by: Daniel Hu <tao.hu@merico.dev>
Copy link
Contributor

@steinliber steinliber left a comment

Choose a reason for hiding this comment

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

LGTM

@daniel-hutao daniel-hutao merged commit 27e0d90 into devstream-io:main Oct 9, 2022
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.

4 participants