Skip to content

Conversation

@aFlyBird0
Copy link
Member

Signed-off-by: Bird aflybird0@gmail.com

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

See #879 for more information.

Related Issues

close #879

New Behavior (screenshots if needed)

config file

---
# core config
varFile: "" # If not empty, use the specified external variables config file
toolFile: "" # If not empty, use the specified external tools config file
state: # state config, backend can be local or s3
  backend: local
  options:
    stateFile: devstream.state

---

tools:
# name of the tool
- name: gitlab-ce-docker
  # id of the tool instance
  instanceID: default
  # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool.
  dependsOn: [ ]
  # options for the plugin
  options:
    # hostname for running docker
    hostname: gitlab.devstream.io
    # the path where you store docker volumes of gitlab
    gitlab_home: /srv/gitlab
    # ssh port exposed in the host machine
    ssh_port: 8122
    # http port exposed in the host machine
    http_port: 8180
    # https port exposed in the host machine
    # todo: support https, reference: https://docs.gitlab.com/omnibus/settings/nginx.html#enable-https
    https_port: 8443

./dtm apply -f gitlab-ce-docker.yaml -y

2022-07-21 14:14:38 ℹ [INFO]  Apply started.
2022-07-21 14:14:38 ℹ [INFO]  Got Backend from config: local
2022-07-21 14:14:38 ℹ [INFO]  Using dir <.devstream> to store plugins.
2022-07-21 14:14:38 ℹ [INFO]  Using local backend. State file: devstream.state.
2022-07-21 14:14:38 ℹ [INFO]  Tool (gitlab-ce-docker/default) found in config but doesn't exist in the state, will be created.
2022-07-21 14:14:38 ℹ [INFO]  Start executing the plan.
2022-07-21 14:14:38 ℹ [INFO]  Changes count: 1.
2022-07-21 14:14:38 ℹ [INFO]  -------------------- [  Processing progress: 1/1.  ] --------------------
2022-07-21 14:14:38 ℹ [INFO]  Processing: (gitlab-ce-docker/default) -> Create ...
Stdout: rc: Pulling from gitlab/gitlab-ce
...
...
Stdout: Digest: sha256:e49f40a1e2f277648a07f19aef0ad267bfd5eab368233367afeeda49be240b11
Stdout: Status: Image is up to date for gitlab/gitlab-ce:rc
Stdout: docker.io/gitlab/gitlab-ce:rc
2022-07-21 14:14:42 ℹ [INFO]  Running container as the name <gitlab>
Stdout: e177b3a2ca4330277cefdb18aca3755923a3db0fec26e6758b0b8de4ca9b04ab
2022-07-21 14:14:42 ℹ [INFO]  GitLab access URL: http://gitlab.devstream.io:8180
2022-07-21 14:14:42 ✔ [SUCCESS]  Tool (gitlab-ce-docker/default) Create done.
2022-07-21 14:14:42 ℹ [INFO]  -------------------- [  Processing done.  ] --------------------
2022-07-21 14:14:42 ✔ [SUCCESS]  All plugins applied successfully.
2022-07-21 14:14:42 ✔ [SUCCESS]  Apply finished.

docker ps | grep gitlab

e177b3a2ca43   gitlab/gitlab-ce:rc      "/assets/wrapper"        12 minutes ago   Up 12 minutes (healthy)   0.0.0.0:8122->22/tcp, :::8122->22/tcp, 0.0.0.0:8180->80/tcp, :::8180->80/tcp, 0.0.0.0:8443->443/tcp, :::8443->443/tcp   gitlab

snapshots

image

image

@aFlyBird0 aFlyBird0 requested review from a team and IronCore864 as code owners July 21, 2022 06:38
Signed-off-by: Bird <aflybird0@gmail.com>
Signed-off-by: Bird <aflybird0@gmail.com>
Copy link

@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.

greate work! I add a review for consistency,maybe you can request another pr for that

@daniel-hutao daniel-hutao merged commit 1c83eb8 into devstream-io:main Jul 22, 2022
@aFlyBird0 aFlyBird0 deleted the docker-util branch July 28, 2022 02:02
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.

🍀 Proposal: Extract docker shell operator from gitlab-ce-docker plugin

4 participants