GitLab + Jenkins + Harbor 工具链快速落地指南( 三 )

这里的配置项并不难看懂,推荐大伙执行后面的命令前先仔细看一遍这个配置文件,按需调整 。比如里面配置了几个工具的域名啥的,这些都可以改 。
然后就可以开始初始化了(主要是插件下载):
dtm init -f config.yaml然后执行 apply 开始部署:
dtm apply -f config.yaml -y这时候你会看到和谐的日志:
2022-10-08 09:43:13  [INFO]  Apply started.2022-10-08 09:43:13  [INFO]  Using dir </root/.devstream/plugins> to store plugins.2022-10-08 09:43:13  [INFO]  Using local backend. State file: devstream-1.state.2022-10-08 09:43:13  [INFO]  Tool (gitlab-ce-docker/default) found in config but doesn't exist in the state, will be created.2022-10-08 09:43:13  [INFO]  Tool (jenkins/default) found in config but doesn't exist in the state, will be created.2022-10-08 09:43:13  [INFO]  Tool (harbor/default) found in config but doesn't exist in the state, will be created.2022-10-08 09:43:13  [INFO]  Start executing the plan.2022-10-08 09:43:13  [INFO]  Changes count: 3.2022-10-08 09:43:13  [INFO]  -------------------- [  Processing progress: 1/3.  ] --------------------2022-10-08 09:43:13  [INFO]  Processing: (gitlab-ce-docker/default) -> Create ...2022-10-08 09:43:13  [INFO]  Cmd: docker image ls gitlab/gitlab-ce:rc -q.2022-10-08 09:43:13  [INFO]  Running container as the name <gitlab>2022-10-08 09:43:13  [INFO]  Cmd: docker run --detach --hostname gitlab.example.com --publish 30022:22 --publish 30080:80 --publish 30443:443 --name gitlab --restart always --volume /srv/gitlab/config:/etc/gitlab --volume /srv/gitlab/data:/var/opt/gitlab --volume /srv/gitlab/logs:/var/log/gitlab gitlab/gitlab-ce:rc.Stdout: 53e30ad85faf7e9d6d18764450bb8458db46b388b690b7c8b7a7cc6d0deb283a2022-10-08 09:43:14  [INFO]  Cmd: docker inspect --format='{{json .Mounts}}' gitlab.2022-10-08 09:43:14  [INFO]  GitLab access URL: http://gitlab.example.com:300802022-10-08 09:43:14  [INFO]  GitLab initial root password: execute the command -> docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password2022-10-08 09:43:14  [SUCCESS]  Tool (gitlab-ce-docker/default) Create done.2022-10-08 09:43:14  [INFO]  -------------------- [  Processing progress: 2/3.  ] --------------------2022-10-08 09:43:14  [INFO]  Processing: (jenkins/default) -> Create ...2022-10-08 09:43:15  [INFO]  Creating or updating helm chart ...2022/10/08 09:43:16 creating 13 resource(s)2022/10/08 09:43:16 beginning wait for 13 resources with timeout of 5m0s2022/10/08 09:43:16 StatefulSet is not ready: jenkins/jenkins. 0 out of 1 expected pods are ready...2022/10/08 09:44:18 StatefulSet is not ready: jenkins/jenkins. 0 out of 1 expected pods are ready2022/10/08 09:44:20 release installed successfully: jenkins/jenkins-4.1.172022-10-08 09:44:20  [SUCCESS]  Tool (jenkins/default) Create done.2022-10-08 09:44:20  [INFO]  -------------------- [  Processing progress: 3/3.  ] --------------------2022-10-08 09:44:20  [INFO]  Processing: (harbor/default) -> Create ...2022-10-08 09:44:21  [INFO]  Creating or updating helm chart ...2022/10/08 09:44:23 creating 28 resource(s)2022/10/08 09:44:23 beginning wait for 28 resources with timeout of 10m0s2022/10/08 09:44:24 Deployment is not ready: harbor/harbor-core. 0 out of 1 expected pods are ready...2022/10/08 09:46:16 Deployment is not ready: harbor/harbor-jobservice. 0 out of 1 expected pods are ready2022/10/08 09:46:18 release installed successfully: harbor/harbor-1.10.02022-10-08 09:46:19  [SUCCESS]  Tool (harbor/default) Create done.2022-10-08 09:46:19  [INFO]  -------------------- [  Processing done.  ] --------------------2022-10-08 09:46:19  [SUCCESS]  All plugins applied successfully.2022-10-08 09:46:19  [SUCCESS]  Apply finished.

推荐阅读