Jenkins

ssh [email protected]

Jenkins running on i-0d1ae716c8bc46b24

--> http://3.129.62.248:8080/

ssh -i "stefano-us-east-2.pem" [email protected]
ubuntu@ip-172-31-27-130:~$ sudo docker ps -a
CONTAINER ID   IMAGE                 COMMAND                  CREATED          STATUS              PORTS                                                                                      NAMES
eaca94ffc84f   jenkins/jenkins:lts   "/usr/bin/tini -- /u…"   25 minutes ago   Up About a minute   0.0.0.0:8080->8080/tcp, :::8080->8080/

# if jenkins is down, because is a t.micro instance
# ssh into the server and start the container
# https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#ConnectToInstance:instanceId=i-0d1ae716c8bc46b24
# you need to have the key to be able to ssh into this machine


$~ ssh -i "stefano-us-east-2.pem" [email protected]

$~ sudo docker ps -a
CONTAINER ID   IMAGE                 COMMAND                  CREATED      STATUS                     PORTS                                                                                      NAMES
eaca94ffc84f   jenkins/jenkins:lts   "/usr/bin/tini -- /u…"   2 days ago   Exited (255) 9 hours ago   0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:50000->50000/tcp, :::50000->50000/tcp   elated_galileo

$~ sudo docker start eaca94ffc84f


# under normai circustances Jenkins should be up and running, 
# `sudo systemctl enable docker`
# just to make sure that added to to systemctl and will restart



  1. Push code to GitHub

  2. Jenkins job triggers

  3. Code testing ( we can use Teamcity )

  4. If all tests pass then Jenkins job builds the Docker image and pushes it to our Docker Hub

  5. On our server we run periodic checks with cronjobs, ECR ( Elastic Container Registry ) where there we keep another copy of the update Docker image for failove scenarios explained earlier on Application Pipeline.

GitHub

Last updated

Was this helpful?