Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
90ae7874
Commit
90ae7874
authored
Dec 05, 2017
by
Jesse Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define jenkins flyweight worker for running flow jobs
parent
05a46e7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
0 deletions
+81
-0
playbooks/edx-east/jenkins_worker_flyweight.yml
+16
-0
util/packer/jenkins_worker_flyweight.json
+65
-0
No files found.
playbooks/edx-east/jenkins_worker_flyweight.yml
0 → 100644
View file @
90ae7874
# Configure a Jenkins flyweight worker instance
# This does not need to run platform tests, it will
# run only flyweight (e.g. flow) jobs.
-
name
:
Configure instance(s)
hosts
:
jenkins_worker
become
:
True
gather_facts
:
True
vars
:
serial_count
:
1
COMMON_SECURITY_UPDATES
:
yes
SECURITY_UPGRADE_ON_ANSIBLE
:
true
serial
:
"
{{
serial_count
}}"
roles
:
-
aws
-
jenkins_worker
util/packer/jenkins_worker_flyweight.json
0 → 100644
View file @
90ae7874
{
"variables"
:
{
"aws_access_key"
:
"{{env `AWS_ACCESS_KEY_ID`}}"
,
"aws_secret_key"
:
"{{env `AWS_SECRET_ACCESS_KEY`}}"
,
"new_relic_key"
:
"{{env `NEW_RELIC_KEY`}}"
,
"playbook_remote_dir"
:
"/tmp/packer-edx-playbooks"
,
"venv_dir"
:
"/edx/app/edx_ansible/venvs/edx_ansible"
,
"ami"
:
"{{env `JENKINS_WORKER_AMI`}}"
,
"security_group"
:
"{{env `AWS_SECURITY_GROUP`}}"
,
"delete_or_keep"
:
"{{env `DELETE_OR_KEEP_AMI`}}"
,
"remote_branch"
:
"{{env `REMOTE_BRANCH`}}"
,
"jenkins_worker_key_url"
:
"{{env `JENKINS_WORKER_KEY_URL`}}"
},
"builders"
:
[{
"type"
:
"amazon-ebs"
,
"access_key"
:
"{{user `aws_access_key`}}"
,
"secret_key"
:
"{{user `aws_secret_key`}}"
,
"ami_name"
:
"jenkins_worker-{{isotime | clean_ami_name}}"
,
"instance_type"
:
"m3.large"
,
"region"
:
"us-east-1"
,
"source_ami"
:
"{{user `ami`}}"
,
"ssh_username"
:
"ubuntu"
,
"ami_description"
:
"jenkins worker flyweight"
,
"iam_instance_profile"
:
"jenkins-worker"
,
"security_group_id"
:
"{{user `security_group`}}"
,
"tags"
:
{
"delete_or_keep"
:
"{{user `delete_or_keep`}}"
},
"launch_block_device_mappings"
:
[{
"delete_on_termination"
:
true
,
"device_name"
:
"/dev/sda1"
,
"volume_size"
:
"40"
,
"volume_type"
:
"gp2"
}]
}],
"provisioners"
:
[{
"type"
:
"shell"
,
"inline"
:
[
"rm -rf {{user `playbook_remote_dir`}}"
,
"mkdir {{user `playbook_remote_dir`}}"
]
},
{
"type"
:
"file"
,
"source"
:
"stop-automatic-updates.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/stop-automatic-updates.sh"
},
{
"type"
:
"file"
,
"source"
:
"../../util/install/ansible-bootstrap.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/ansible-bootstrap.sh"
},
{
"type"
:
"shell"
,
"inline"
:
[
"cd {{user `playbook_remote_dir`}}"
,
"export CONFIGURATION_VERSION='{{user `remote_branch`}}'"
,
"sudo bash ./stop-automatic-updates.sh"
,
"sudo bash ./ansible-bootstrap.sh"
]
},
{
"type"
:
"ansible-local"
,
"playbook_file"
:
"../../playbooks/edx-east/jenkins_worker_flyweight.yml"
,
"playbook_dir"
:
"../../playbooks"
,
"command"
:
". {{user `venv_dir`}}/bin/activate && ansible-playbook"
,
"inventory_groups"
:
"jenkins_worker"
,
"extra_arguments"
:
[
"-e
\"
NEWRELIC_LICENSE_KEY={{user `new_relic_key`}} jenkins_worker_key_url='{{user `jenkins_worker_key_url`}}'
\"
"
,
"-vvv"
]
}]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment