Module 4: Tool and Credential Configuration — F5 CICD Lab JPN documentation
F5 CICD Lab JPN > Environment Setup Source | Edit on

Module 4: Tool and Credential Configuration

In this next step, we will configure the GitHub, Slack, and Jenkins tools.

Instructions:

  1. Access your GitHub account > in the top right corner, click your profile > Settings > Developer settings > Personal access tokens > click Generate new token > enter in your password > enter in description such as “Jenkins token” > check admin:repo_hook > Generate token > save token in a safe location before moving on

  2. Access your Slack administration page > Manage > Apps > Find and install Jenkins CI > Click Add Configuration > Select channel you want to post to, description, and save the token in a safe location before moving on

  3. Log into your ubuntu command line and navigate to the f5-cicdlab/terraform-ansible-aws/F5_Standalone_1Nic/ansible/playbooks/group_vars/F5_systems/ directory and create a file called f5_vault with below values:

  4. Run below command to encrypt the f5_vault file using a long, strong password (at least 10 characters, mixed case, and symbols)

    • ansible-vault encrypt .../F5_systems/f5_vault
  5. Access Jenkins UI > Credentials > click (global) > Add Credentials > configure below credentials:

    • GitHub Token (for use by the GitHub plugin)
      • Kind: Vault Github Token Credential
      • Scope: Global
      • Personal Access Token: <enter personal token obtained from GitHub earlier>
      • ID: short name for this token
      • Description: short description
    • GitHub Credentials (for use by the Pipeline project)
      • Kind: Username with password
      • Scope: Global
      • Username: your GitHub Username
      • Password: enter in Personal Access Token obtained from GitHub earlier
      • ID: short name for this token
      • Description: short description
    • AWS Credentials
      • Kind: AWS Credentials
      • Scope: Global
      • ID: short name for this credentials
      • Description: short description
      • Access Key ID: enter in access key ID obtained from AWS earlier
      • Secret Access Key: enter in secret access key obtained from AWS earlier
    • Ansible Vault Password
      • Kind: Secret text
      • Scope: Global
      • Secret: enter in the password you used for Ansible vault earlier
      • ID: short name for this token
      • Description: short description
    • Slack Token
      • Kind: Secret text
      • Scope: Global
      • Secret: <enter in the token obtained from Slack earlier>
      • ID: short name for this token
      • Description: short description
  6. Access Jenkins UI > Manage Jenkins > Configure System

  7. In Global properties > check Environment variables and configure below

    • Name: PATH+EXTRA
    • Value: /bin/terraform
  8. In GitHub > GitHub Servers > configure below

  9. In Global Slack Notifier Settings > enter in your slack URL > for Integration Token Credential ID, click Click Add > Jenkins > Kind= Secret text > enter in your Slack secret > select this credential > select desired Channel or Slack ID

  10. Access Jenkins UI > Manage Jenkins > AWS > configure as below:

    • Region: Select your Region
    • Amazon Credentials: select the AWS credentials you created earlier