Skip to content

rustamar/jenkins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TASK

  1. Create a Docker image, that will contain Jenkins installation;

  2. For that installation, using Job DSL/Pipeline DSL, create a job-generator, that will provision Jenkins instance (same one, master) with JobX.

    JobX - a Jenkins job, that will deploy HTML page (Hello World) into Apache server (preferably Dockerized also) and run it.

    Final Jenkins image has to contain 1 job (Generator) to generate another job (JobX).

  3. Start Jenkins container from create image and run JobX and display content of HTML page.

ADDITIONAL TASK

Deploy this setup to AWS:

  • create basic resources for EC2 to run;
  • create EC2 instance, provision it with Docker, run the custom Jenkins image from DockerHub;
  • go to Step 3.

COMPLETED

  1. Created docker image with jenkins from standard jenkins image from Docker Hub jenkins repository. The image is located in Docker Hub repository. The final version is rustamar/jenkins_generator:3

    Changes applied to image:

    • installed Job DSL, and Job Generator plugins
    • added private key for access to "apache" instance
    • created Generator job which loads configuration from current git repository (jenkins_pipeline/Jenkinsfile)
  2. Created IaaC project in terraform. The project creates environment in AWS for current task

    Resources created in ECS:
    • VPC
    • Subnet
    • AMI roles for load balancer and ecs
    • Security Group
    • ALB, auto scaling group, ECS cluster, service, task for jenkins
    • ECS service and task for http. The service and task are located in the same cluster as jenkins
    • Key pair "admin" for access to the ECS instance
    Create environment
  3. Destroy environment in AWS run command terraform destroy. Answer yes and all resources should be removed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published