Module 3: Install Tools — F5 CICD Lab JPN documentation
F5 CICD Lab JPN > Environment Setup Source | Edit on

Module 3: Install Tools

In this guide, we will be using the root account.

Note

AWS best practice is to use root only temporarily by deleting the root password after use. passwd –d root

Instructions:

  1. Use SSH key to log into your ubuntu server, then set root password

    • sudo su
    • passwd root
  2. Install pre-requisite applications

    • apt-get update
    • apt-get install build-essential checkinstall
    • apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
  3. Install python 2.7

    • wget https://www.python.org/ftp/python/2.7.16/Python-2.7.16.tgz
    • tar xzvf Python-2.7.16.tgz
    • ./configure --enable-optimizations
    • make altinstall
    • python2.7 -V
  4. Install python-pip

    • apt install python-pip
  5. Install Terraform

    • curl -O https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip
    • mkdir /bin/terraform
    • apt-get install unzip
    • unzip filename -d /bin/terraform
    • export PATH=$PATH:/bin/terraform
    • terraform --version
  6. Install AWS CLI

    • pip install awscli --user --upgrade
    • aws --version
  7. Install Ansible

    • apt-get install software-properties-common
    • apt-add-repository ppa:ansible/ansible
    • apt update
    • apt-get install ansible
    • ansible --version
  8. Configure Ansible

    • nano /etc/ansible/ansible.cfg
    • uncomment this line: host_key_checking = False
  9. Install f5-sdk library used by Ansible modules

    • install f5-sdk --upgrade
  10. Install Java

    • add-apt-repository ppa:webupd8team/java
    • apt update
    • apt install openjdk-8-jre-headless
  11. Install Jenkins

    • wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
    • sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
    • apt-get update
    • apt-get install jenkins
    • systemctl start jenkins
    • systemctl status jenkins
  12. Get initial Jenkins password and connect to your Jenkins portal to change

  13. Install Jenkins plugins at Jenkins > Manage Jenkins > Manage Plugins > Available tab > search and Install without restart

    • Amazon EC2 plugin
    • Ansible plugin
    • AWS Global Configuration Plugin
    • GitHub Authentication plugin
    • Global Slack Notifier Plugin
    • Pipeline GitHub Notify Step Plugin
    • Pipeline: AWS Steps
    • Pipeline: GitHub
    • Pipeline: GitHub Groovy Libraries
    • Terraform Plugin
  14. Generate key used for accessing resources deployed in AWS. Store the private and public keys in a safe location

    • ssh-keygen -t rsa -b4096
  15. Create working directory in location of your choice (optional)

    • mkdir cicdlab
    • cd cicdlab
  16. In your GitHub account, fork the below repository

    • https://github.com/tkam8/f5-cicdlab
  17. In your working directory, clone the master branch of your cicd lab repository to your your ubuntu instance

    • ``git clone -branch master https://<githubusername>@github.com/<githubreponame>/f5-cicdlab.git ``

This completes installation of required tools and plugins.