Prerequisites
Kubernetes cluster and DevStream CLI installed
Toolchain Deployment Configuration
Create toolchain.yaml configuration file:
---
tools:
- name: gitlab-docker
instanceID: primary
options:
hostname: gitlab.example.org
httpPort: 30080
- name: jenkins-k8s
instanceID: main
options:
chart:
valuesYaml: |
controller:
adminPassword: "securepass123"
ingress:
hostName: jenkins.example.org
- name: harbor-k8s
instanceID: registry
options:
chart:
valuesYaml: |
externalURL: http://harbor.example.org
persistence:
registry:
size: 10Gi
Deploy Tools
dtm init -f toolchain.yaml
dtm apply -f toolchain.yaml -y
Network Configuration
Add DNS records to /etc/hosts:
SERVER_IP gitlab.example.org jenkins.example.org harbor.example.org
Update CoreDNS ConfigMap:
kubectl edit cm coredns -n kube-system
# Add hosts block:
hosts {
SERVER_IP gitlab.example.org
...
}
Access Credentials
- GitLab: Retrieve root password via
docker exec gitlab cat /etc/gitlab/initial_root_password - Jenkins: Username
admin, passwordsecurepass123 - Harbor: Username
admin, passwordHarbor12345
Piepline Configuration
Create pipeline.yaml:
---
tools:
- name: repo-scaffolding
instanceID: java-app
options:
destinationRepo:
repo: java-spring-demo
baseURL: http://gitlab.example.org:30080
- name: jenkins-pipeline
instanceID: main
dependsOn: [repo-scaffolding.java-app]
options:
jenkins:
url: http://jenkins.example.org
scm:
cloneURL: http://gitlab.example.org:30080/root/java-spring-demo
pipeline:
jobName: springboot-pipeline
imageRepo:
url: http://harbor.example.org
Execute Pipeline Setup
export GITLAB_TOKEN=YOUR_GITLAB_TOKEN
export HARBOR_PASS=Harbor12345
dtm apply -f pipeline.yaml -y
Verification Steps
- Access GitLab at
http://gitlab.example.org:30080- verify repository creation - Log in to Jenkins - confirm pipeline job exists
- Check Harbor at
http://harbor.example.org- validate container storage - Trigger GitLab commit - observe pipeline execution
CI Workflow
Automated process flow:
- Code push to GitLab triggers Jenkins pipeline
- Jenkins builds artifacts and creates container image
- Image pushed to Harbor registry
- Build status reported back to GitLab