Giter VIP home page Giter VIP logo

devopsdays_2017's Introduction

DevOpsDays Taipei 2017 - Everything As Code

This repository is for demonstrate below items:

  • Jenkins: Pipeline As Code
  • Terraform: Infrastructure As Code
  • CM: Provision As Code
  • Packer: Image As Code
  • Docker: Server As Code
  • Kubernetes: Orchestration As Code
  • Hubot: Chat As Code

If anyone is interested about the ignore topic above, here is the Slide and GitHub Repository for reference ^^

There are three modules need to be setup...

Prerequisite

  • Linux Based Machine
  • Docker
  • AWS Account

Jenkins (power by container)

  • Export AWS access key ID, secret access key and region

     ~$ export AWS_ACCESS_KEY_ID =XXXXXX
     ~$ export AWS_SECRET_ACCESS_KEY =XXXXXX
     ~$ export AWS_DEFAULT_REGION=us-east-1
    
  • Create a AWS S3 bucket as Terraform as backend to store cloud resource state, then export the S3 bucket name

     ~$ export TERRAFORM_BACKEND_S3_BUCKET=${S3 Bucket Name}
    
    
  • Execute below command to launch Jenkins

     ~$ ./jenkins.container
    
     Pull the image: smalltown/devopsdays_2017:jenkins
     jenkins: Pulling from smalltown/devopsdays_2017
     06b22ddb1913: Already exists
     
     ...
     
     Digest: sha256:3e8e2c1e3dac5d0df8f767c2f73bbbdfbf5872f528efb3ae2c0955e0534da9cf
     Status: Downloaded newer image for smalltown/	devopsdays_2017:jenkins
    
     Starting Docker Container: smalltown/devopsdays_2017:jenkins:
     Container ID: jenkins-1504540691
     AWS Default Region: us-east-1
     AWS Access Key ID: ********
     AWS Secret Access Key: ********
     Terraform Backend S3 Bucket: ${S3 Bucket Name}
     e682b9b8ba03d66cd7de01c51446627871a1f860b19ce33984f7a24090ab1854
    
  • Visit http://127.0.0.1 from the browser after several minutes

  • Login Jenkins by below account and password

    • Admin Account : devopsdays
    • Admin Password : devopsdays

Terraform (power by Hashicorp)

  • Get the Jenkins container ID, e.g. here is e682b9b8ba03

     ~$ docker ps
    
     CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                                            NAMES
     e682b9b8ba03        smalltown/devopsdays_2017:jenkins   "/bin/tini -- /usr..."   10 minutes ago      Up 10 minutes       0.0.0.0:50000->50000/tcp, 0.0.0.0:80->8080/tcp   jenkins-1504540691
    
  • Enter the container

     ~$ docker exec -it e682b9b8ba03 bash
    
  • Switch to the Terraform repository folder

     ~$ cd ~/terraform-repo/aws_account/demo/us-east-1/Infrastructure_As_Code
    
  • Refer to The Document for terraform operation

devopsdays_2017's People

Contributors

smalltown avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.