Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
cf-jenkins-main-203.yml
cf-jenkins-vpc-203.yml

README.md

LinkedIn slack Github

File me tickets or star the repo.

Table of Contents

Requirements

  1. Finish Scenario-202
  2. Use CF to create a dedicated VPC and start an EC2

Procedures

Launch

  • Use CF to setup the env
export STACK_NAME="aws-jenkins"

# The IP address range that can be used to Access Jenkins URL
[ -n "$JENKINS_LOCATION" ] || export JENKINS_LOCATION="0.0.0.0/0"
# Test jenkins username and password
export JENKINS_USER="jenkins123"
export JENKINS_PASSWORD="password123"
[ -n "$JENKINS_PORT" ] || export JENKINS_PORT='8081'

# Slack Token for Jenkins jobs. If empty, no slack notifications
[ -n "$SLACK_TOKEN" ] || export SLACK_TOKEN='CUSTOMIZETHIS'
# ssh key name to access EC2 instance
[ -n "$SSH_KEY_NAME" ] || export SSH_KEY_NAME="YOUR_SSH_KEYNAME_CUSTOMIZE"
export TMP_FILE="file://cf-jenkins-vpc-203.yml"
aws cloudformation create-stack --template-body "$TMP_FILE" \
    --stack-name "$STACK_NAME" --parameters \
    ParameterKey=StackName,ParameterValue=$STACK_NAME \
    ParameterKey=JenkinsLocation,ParameterValue=$JENKINS_LOCATION \
    ParameterKey=JenkinsPort,ParameterValue=$JENKINS_PORT
export TMP_FILE="file://cf-jenkins-main-203.yml"
aws cloudformation create-stack --template-body "$TMP_FILE" \
    --stack-name "$STACK_NAME" --parameters \
    ParameterKey=StackName,ParameterValue=$STACK_NAME \
    ParameterKey=JenkinsUser,ParameterValue=$JENKINS_USER \
    ParameterKey=JenkinsPassword,ParameterValue=$JENKINS_PASSWORD \
    ParameterKey=SlackAuthToken,ParameterValue=$SLACK_TOKEN \
    ParameterKey=JenkinsLocation,ParameterValue=$JENKINS_LOCATION \
    ParameterKey=JenkinsPort,ParameterValue=$JENKINS_PORT \
    ParameterKey=KeyName,ParameterValue=$SSH_KEY_NAME
aws cloudformation delete-stack --stack-name "$STACK_NAME"

  • Verify Jenkins curl -I http://$server_ip:8080

TODO: enable ThinBackup for config changes

TODO: remove two jenkins warnings

Allowing Jenkins CLI to work in -remoting mode is considered
dangerous and usually unnecessary. You are advised to disable this
mode. Please refer to the CLI documentation for details.

Agent to master security subsystem is currently off. Please read the
documentation and consider turning it on