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
76417386
Commit
76417386
authored
Oct 30, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #384 from edx/jarv/reconfigure-from-jenkins
adding reconfigure option for
parents
e48399ba
805d91d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
66 deletions
+12
-66
util/jenkins/ansible-configure.sh
+0
-66
util/jenkins/ansible-deploy.sh
+12
-0
No files found.
util/jenkins/ansible-configure.sh
deleted
100644 → 0
View file @
e48399ba
#!/usr/bin/env bash
# Ansible configuration/deploy wrapper script that
# assumes the following parameters set
# as environment variables
#
# - dns_name - REQUIRED
# - dns_zone
# - edxapp_version
# - forum_version
# - xqueue_version
# - xserver_version
# - ora_version
# - ease_version
# - deploy
# - keypair
export
BOTO_CONFIG
=
/var/lib/jenkins/
${
aws_account
}
.boto
if
[[
-z
$WORKSPACE
]]
;
then
dir
=
$(
dirname
$0
)
source
"
$dir
/ascii-convert.sh"
else
source
"
$WORKSPACE
/util/jenkins/ascii-convert.sh"
fi
if
[[
-z
$dns_name
]]
;
then
echo
"The hostname is required to know what machine to configure"
exit
1
fi
if
[[
!
-f
$BOTO_CONFIG
]]
;
then
echo
"AWS credentials not found for
$aws_account
"
exit
1
fi
extra_vars
=
"/var/tmp/extra-vars-
$$
.yml"
cat
<<
EOF
>
$extra_vars
---
EDXAPP_PREVIEW_LMS_BASE: preview.
${
dns_name
}
.
${
dns_zone
}
EDXAPP_LMS_BASE:
${
dns_name
}
.
${
dns_zone
}
EDXAPP_LMS_PREVIEW_NGINX_PORT: 80
EDXAPP_CMS_NGINX_PORT: 80
XSERVER_GRADER_CHECKOUT: False
c_skip_grader_checkout: True
edx_platform_commit:
$edxapp_version
forum_version:
$forum_version
xqueue_version:
$xqueue_version
xserver_version:
$xserver_version
ora_version:
$ora_version
ease_version:
$ease_version
ansible_ssh_private_key_file: /var/lib/jenkins/
${
keypair
}
.pem
EOF
cat
$extra_vars
cd
playbooks/edx-east
./ec2.py
--refresh
ansible-playbook
-vvv
$playbook
-i
./ec2.py
-e
"@
$extra_vars
"
--user
ubuntu
--tags
deploy
util/jenkins/ansible-deploy.sh
View file @
76417386
...
...
@@ -52,6 +52,11 @@ COMMON_PYPI_MIRROR_URL: 'https://pypi.edx.org/root/pypi/+simple/'
COMMON_GIT_MIRROR: 'git.edx.org'
migrate_only: '
$run_migration
'
XSERVER_GRADER_DIR: "{{ xserver_data_dir }}/data/content-mit-600x~2012_Fall"
XSERVER_GRADER_SOURCE: "git@github.com:/MITx/6.00x.git"
XSERVER_LOCAL_GIT_IDENTITY: /var/lib/jenkins/git-identity-edx-pull
EOF
cat
$extra_vars
...
...
@@ -69,6 +74,13 @@ deploy[ora]=$ora
ssh-keygen
-f
"/var/lib/jenkins/.ssh/known_hosts"
-R
"
$deploy_host
"
cd
playbooks/edx-east
# If reconfigure was selected run non-deploy tasks for all roles
if
[[
$reconfigure
==
"true"
]]
;
then
ansible-playbook
-vvvv
edx_continuous_integration.yml
-i
"
${
deploy_host
}
,"
-e
"@
${
extra_vars
}
"
--user
ubuntu
--skip-tags
deploy
fi
# Run deploy tasks for the roles selected
for
i
in
"
${
!deploy[@]
}
"
;
do
if
[[
${
deploy
[
$i
]
}
==
"true"
]]
;
then
ansible-playbook
-vvvv
deploy_
${
i
}
.yml
-i
"
${
deploy_host
}
,"
-e
"@
${
extra_vars
}
"
--user
ubuntu
--tags
deploy
...
...
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