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
565e39ba
Commit
565e39ba
authored
Apr 26, 2016
by
Brian Beggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to the CD ansible plays to better accommodate how GoCD handles artifacts
parent
4c2bb694
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
playbooks/continuous_delivery/cleanup.yml
+2
-1
playbooks/continuous_delivery/create_ami.yml
+8
-3
playbooks/continuous_delivery/launch_instance.yml
+3
-3
playbooks/continuous_delivery/templates/local/launch_template.yml.j2
+2
-1
No files found.
playbooks/continuous_delivery/cleanup.yml
View file @
565e39ba
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
-
name
:
cleanup local file system
-
name
:
cleanup local file system
file
:
file
:
path
:
"
{{
artifact_path
}}
/{{
keypair_id
}}
"
path
:
"
{{
artifact_path
}}"
state
:
absent
state
:
absent
-
name
:
Send Hipchat notification cleanup has finished
-
name
:
Send Hipchat notification cleanup has finished
...
@@ -54,5 +54,6 @@
...
@@ -54,5 +54,6 @@
token
:
"
{{
hipchat_token
}}"
token
:
"
{{
hipchat_token
}}"
room
:
"
{{
hipchat_room
}}"
room
:
"
{{
hipchat_room
}}"
msg
:
"
Cleanup
for
run
id:
{{
keypair_id
}}
complete."
msg
:
"
Cleanup
for
run
id:
{{
keypair_id
}}
complete."
ignore_errors
:
yes
when
:
hipchat_token is defined
when
:
hipchat_token is defined
playbooks/continuous_delivery/create_ami.yml
View file @
565e39ba
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
# ansible-playbook -vvvv -i "localhost," -c local \
# ansible-playbook -vvvv -i "localhost," -c local \
# -e @overrides.yml \
# -e @overrides.yml \
# -e @/tmp/ansible-runtime/d057a5d9-4fc5-4a21-9646-4c135be0b7c8/launch_info.yml \
# -e @/tmp/ansible-runtime/d057a5d9-4fc5-4a21-9646-4c135be0b7c8/launch_info.yml \
# -e
cluster
=pipline-test \
# -e
play
=pipline-test \
# -e deployment=edx \
# -e deployment=edx \
# -e edx_environment=sandbox \
# -e edx_environment=sandbox \
# -e cluster_version=12345 \
# -e cluster_version=12345 \
...
@@ -52,7 +52,6 @@
...
@@ -52,7 +52,6 @@
gather_facts
:
False
gather_facts
:
False
connection
:
local
connection
:
local
tasks
:
tasks
:
-
name
:
Create AMI
-
name
:
Create AMI
ec2_ami_2_0_0_1
:
ec2_ami_2_0_0_1
:
instance_id
:
"
{{
instance_id
}}"
instance_id
:
"
{{
instance_id
}}"
...
@@ -82,10 +81,16 @@
...
@@ -82,10 +81,16 @@
version:edxapp_theme
:
"
{{
edx_app_theme_repo
}}
{{
edx_app_theme_version
}}"
version:edxapp_theme
:
"
{{
edx_app_theme_repo
}}
{{
edx_app_theme_version
}}"
when
:
edx_app_theme_version is defined and edx_app_theme_repo is defined
when
:
edx_app_theme_version is defined and edx_app_theme_repo is defined
-
name
:
Ensure artifact directory exists
file
:
path
:
"
{{
artifact_path
}}"
state
:
directory
force
:
yes
-
name
:
Generate artifact container the instance_id
-
name
:
Generate artifact container the instance_id
template
:
template
:
src
:
templates/local/ami_template.yml.j2
src
:
templates/local/ami_template.yml.j2
dest
:
"
{{
artifact_path
}}/
{{
keypair_id
}}/
ami.yml"
dest
:
"
{{
artifact_path
}}/ami.yml"
mode
:
0600
mode
:
0600
-
name
:
Send Hipchat notification AMI is finished baking
-
name
:
Send Hipchat notification AMI is finished baking
...
...
playbooks/continuous_delivery/launch_instance.yml
View file @
565e39ba
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
-
name
:
Ensure artifact directory exists
-
name
:
Ensure artifact directory exists
file
:
file
:
path
:
"
{{
artifact_path
}}
/{{
unique_key_name.stdout
}}/
"
path
:
"
{{
artifact_path
}}"
state
:
directory
state
:
directory
force
:
yes
force
:
yes
...
@@ -81,13 +81,13 @@
...
@@ -81,13 +81,13 @@
-
name
:
Generate artifact for jobs down stream
-
name
:
Generate artifact for jobs down stream
template
:
template
:
src
:
templates/local/launch_template.yml.j2
src
:
templates/local/launch_template.yml.j2
dest
:
"
{{
artifact_path
}}/
{{
unique_key_name.stdout
}}/
launch_info.yml"
dest
:
"
{{
artifact_path
}}/launch_info.yml"
mode
:
0600
mode
:
0600
-
name
:
Generate key material artifact for jobs down stream
-
name
:
Generate key material artifact for jobs down stream
template
:
template
:
src
:
templates/local/key.pem.j2
src
:
templates/local/key.pem.j2
dest
:
"
{{
artifact_path
}}/
{{
unique_key_name.stdout
}}/
key.pem"
dest
:
"
{{
artifact_path
}}/key.pem"
mode
:
0600
mode
:
0600
playbooks/continuous_delivery/templates/local/launch_template.yml.j2
View file @
565e39ba
keypair_id: {{ unique_key_name.stdout }}
keypair_id: {{ unique_key_name.stdout }}
key_material_file: {{ artifact_path }}/
{{ unique_key_name.stdout }}/
key.pem
key_material_file: {{ artifact_path }}/key.pem
instance_id: {{ ec2_instance_register.instances[0].id }}
instance_id: {{ ec2_instance_register.instances[0].id }}
instance_ip: {{ ec2_instance_register.instances[0].private_ip }}
instance_ip: {{ ec2_instance_register.instances[0].private_ip }}
\ No newline at end of file
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