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
b16bb1c1
Commit
b16bb1c1
authored
Mar 28, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding user provided extra vars
parent
d7083830
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
util/jenkins/ansible-provision.sh
+17
-14
No files found.
util/jenkins/ansible-provision.sh
View file @
b16bb1c1
...
...
@@ -41,7 +41,7 @@ if [[ ! -f $BOTO_CONFIG ]]; then
exit
1
fi
extra_vars
=
"/var/tmp/extra-vars-
$$
.yml"
extra_vars
_file
=
"/var/tmp/extra-vars-
$$
.yml"
if
[[
-z
$region
]]
;
then
region
=
"us-east-1"
...
...
@@ -80,7 +80,7 @@ ssh-keygen -f "/var/lib/jenkins/.ssh/known_hosts" -R "$deploy_host"
cd
playbooks/edx-east
cat
<<
EOF
>
$extra_vars
cat
<<
EOF
>
$extra_vars
_file
---
ansible_ssh_private_key_file: /var/lib/jenkins/
${
keypair
}
.pem
EDXAPP_PREVIEW_LMS_BASE: preview.
${
deploy_host
}
...
...
@@ -96,11 +96,14 @@ ease_version: $ease_version
certs_version:
$certs_version
discern_version:
$discern_version
EDXAPP_STATIC_URL_BASE:
$static_url_base
# User provided extra vars
$extra_vars
EOF
if
[[
$basic_auth
==
"true"
]]
;
then
# vars specific to provisioning added to $extra-vars
cat
<<
EOF_AUTH
>>
$extra_vars
cat
<<
EOF_AUTH
>>
$extra_vars
_file
NGINX_HTPASSWD_USER:
$auth_user
NGINX_HTPASSWD_PASS:
$auth_pass
EOF_AUTH
...
...
@@ -109,7 +112,7 @@ fi
if
[[
$recreate
==
"true"
]]
;
then
# vars specific to provisioning added to $extra-vars
cat
<<
EOF
>>
$extra_vars
cat
<<
EOF
>>
$extra_vars
_file
dns_name:
$dns_name
keypair:
$keypair
instance_type:
$instance_type
...
...
@@ -136,14 +139,14 @@ elb: $elb
EOF
# run the tasks to launch an ec2 instance from AMI
cat
$extra_vars
ansible-playbook edx_provision.yml
-i
inventory.ini
-e
@
${
extra_vars
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
-v
cat
$extra_vars
_file
ansible-playbook edx_provision.yml
-i
inventory.ini
-e
@
${
extra_vars
_file
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
-v
if
[[
$server_type
==
"full_edx_installation"
]]
;
then
# additional tasks that need to be run if the
# entire edx stack is brought up from an AMI
ansible-playbook rabbitmq.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
ansible-playbook restart_supervisor.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
ansible-playbook rabbitmq.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
_file
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
ansible-playbook restart_supervisor.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
_file
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
fi
fi
...
...
@@ -156,21 +159,21 @@ done
# If reconfigure was selected or if starting from an ubuntu 12.04 AMI
# run non-deploy tasks for all roles
if
[[
$reconfigure
==
"true"
||
$server_type
==
"full_edx_installation_from_scratch"
]]
;
then
cat
$extra_vars
ansible-playbook edx_continuous_integration.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
--skip-tags
deploy
cat
$extra_vars
_file
ansible-playbook edx_continuous_integration.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
_file
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
--skip-tags
deploy
fi
if
[[
$server_type
==
"full_edx_installation"
||
$server_type
==
"full_edx_installation_from_scratch"
]]
;
then
# Run deploy tasks for the roles selected
for
i
in
$roles
;
do
if
[[
${
deploy
[
$i
]
}
==
"true"
]]
;
then
cat
$extra_vars
ansible-playbook
${
i
}
.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
--tags
deploy
cat
$extra_vars
_file
ansible-playbook
${
i
}
.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
_file
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
--tags
deploy
fi
done
fi
# deploy the edx_ansible role
ansible-playbook edx_ansible.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
ansible-playbook edx_ansible.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars
_file
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
rm
-f
"
$extra_vars
"
rm
-f
"
$extra_vars
_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