Commit 58fbd4f4 authored by dyong's avatar dyong

add readme from claudio

parent 109b7be9
# training-cicd
## 1. Install Docker Host
https://docs.docker.com/docker-for-mac/install/
## 2. Start and Configure the Jenkins Server
```
# creates the internal docker network
docker network create jenkins
# pull and start the jenkins docker image
docker pull jenkins/jenkins:lts
docker run -p 8080:8080 -p 50000:50000 --network jenkins --hostname jenkins jenkins/jenkins:lts
```
Check the console output of the docker container while running it will display the initial password to start the Jenkins setup wizzard. Do not close the console tab after the contaner started running.
## 3. Create the devenv Docker Container
```
docker build -t 'devenv' .
docker run -d -p 8090:8080 -p 3001:22 --name devenv --network jenkins --hostname devenv devenv:latest
```
# 3.1 ssh into the devenv container, and start nginx
```
docker exec -it devenv /bin/bash
```
Then from within the container run:
```
/etc/init.d/nginx start
```
## 4. Configure devenv container as docker-slave
#### 4.0 set up Jenkins using the wizzard
Use the initial password from the console and then create the admin user and password, and select the recommended/default plugins to start Jenkins.
#### 4.1 go to manage jenkins
![Manage Jenkins](/images/1.png)
#### 4.2 go to manage nodes
![Manage Nodes](/images/2.png)
#### 4.3 go to New Node
#### 4.4 configure the node
![Slave Config](/images/3.png)
#### 4.5 add credentials for jenkins to use the slave node
![Creds](/images/4.png)
## 5. Create a multibranch pipeline for the project
![new item](/images/5.png)
#### 5.1 Configure the job
![job config](/images/6.png)
#### 5.2 point to git repo https://gitlab.mynisum.com/cgallardo/training-cicd-refapp
![job config](/images/7.png)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment