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
36e371f4
Commit
36e371f4
authored
Aug 23, 2016
by
Feanil Patel
Committed by
GitHub
Aug 23, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into saleem-latif/SOL-2037
parents
0fcedc07
9c7fc649
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
162 additions
and
20 deletions
+162
-20
playbooks/edx-east/jenkins_worker_android.yml
+15
-0
playbooks/roles/android_sdk/defaults/main.yml
+13
-0
playbooks/roles/android_sdk/tasks/main.yml
+39
-0
playbooks/roles/ecommerce/meta/main.yml
+0
-2
playbooks/roles/edx_themes/defaults/main.yml
+1
-1
playbooks/roles/edx_themes/tasks/main.yml
+0
-15
playbooks/roles/edxapp/meta/main.yml
+0
-2
playbooks/roles/jenkins_worker/meta/main.yml
+16
-0
playbooks/roles/jenkins_worker/tasks/main.yml
+2
-0
playbooks/roles/jenkins_worker/tasks/test_android_worker.yml
+17
-0
util/packer/jenkins_worker_android.json
+59
-0
No files found.
playbooks/edx-east/jenkins_worker_android.yml
0 → 100644
View file @
36e371f4
# Configure a Jenkins worker instance
# This has all the requirements to build, sign, and test the android
# client, but does not contain the platform
-
name
:
Configure instance(s)
hosts
:
jenkins_worker
become
:
True
gather_facts
:
True
vars
:
serial_count
:
1
android_worker
:
True
serial
:
"
{{
serial_count
}}"
roles
:
-
aws
-
jenkins_worker
playbooks/roles/android_sdk/defaults/main.yml
0 → 100644
View file @
36e371f4
---
# User/group to manage Android SDK
android_user
:
"
android"
android_group
:
"
android"
# Tarball to download
android_download
:
"
android-sdk_r24.4.1-linux.tgz"
# Checksum of Android SDK (from: https://developer.android.com/studio/index.html#downloads)
android_checksum
:
"
725bb360f0f7d04eaccff5a2d57abdd49061326d"
# path to installed android sdk
android_home
:
"
/opt/android-sdk-linux"
# individual android build targets to be downloaded via the androind sdk manager
android_build_targets
:
-
android-23
playbooks/roles/android_sdk/tasks/main.yml
0 → 100644
View file @
36e371f4
---
# Configure a system for building the edx android application
# Configure a user/group to own/run the android sdk
-
name
:
Create group for the user of the sdk
group
:
name={{ android_group }} state=present
-
name
:
Add the user to the group and configure shell
user
:
name={{ android_user }} append=yes group={{ android_group }} shell=/bin/bash
# Download the Android SDK/tools tarball from Google's download site.
# NOTE: while it is the general policy to use repositories/ppas as much as possible
# it did not seem reliable for this work. Other avenues were explored:
# - pre-Ubuntu 16 releases do not contain the android sdk in their apt repos
# - the existing ppas containing the sdk are questionable
# - ubuntu-make did not seem reliable at the time of writing this
-
name
:
Download the Android SDK tarball
get_url
:
url
:
"
https://dl.google.com/android/{{
android_download
}}"
dest
:
/tmp/android-sdk.tgz
-
name
:
Verify checksum of Android SDK
shell
:
"
sha1sum
/tmp/android-sdk.tgz"
register
:
sdk_checksum
-
assert
:
that
:
"
'{{
android_checksum
}}'
in
sdk_checksum.stdout"
-
name
:
Unarchive tarball to /opt/android-sdk
unarchive
:
copy
:
no
src
:
/tmp/android-sdk.tgz
dest
:
/opt
creates
:
"
{{
android_home
}}"
owner
:
"
{{
android_user
}}"
group
:
"
{{
android_group
}}"
become
:
yes
# Use the android sdk manager to install the build targets necessary for the edx mobile app
-
name
:
Install Android API levels
shell
:
"
echo
'y'
|
{{
android_home
}}/tools/android
update
sdk
--no-ui
--filter
{{
','.join(android_build_targets)
}}"
become
:
yes
become_user
:
"
{{
android_user
}}"
playbooks/roles/ecommerce/meta/main.yml
View file @
36e371f4
...
...
@@ -25,8 +25,6 @@ dependencies:
-
role
:
edx_themes
theme_users
:
-
"
{{
ecommerce_user
}}"
additional_theme_dirs
:
-
"
{{
ECOMMERCE_COMPREHENSIVE_THEME_DIRS
}}"
when
:
"
{{
ECOMMERCE_ENABLE_COMPREHENSIVE_THEMING
}}"
-
oraclejdk
playbooks/roles/edx_themes/defaults/main.yml
View file @
36e371f4
...
...
@@ -13,7 +13,7 @@
themes_service_name
:
"
edx-themes"
themes_user
:
"
{{
themes_service_name
}}"
themes_group
:
"
{{
themes_user
}}
"
themes_group
:
"
www-data
"
themes_home
:
"
{{
COMMON_DATA_DIR
}}/{{
themes_service_name
}}"
THEMES_CODE_DIR
:
"
{{
themes_home
}}/{{
themes_service_name
}}"
...
...
playbooks/roles/edx_themes/tasks/main.yml
View file @
36e371f4
...
...
@@ -28,8 +28,6 @@
# theme_users:
# - ecommerce
# - edxapp
# additional_theme_dirs:
# - /edx/app/ecommerce/ecommerce/ecommerce/themes
# when do_setup_themes
#
...
...
@@ -46,19 +44,6 @@
-
install
-
install:base
-
name
:
assign theme's group to all theme's directories
file
:
path
:
"
{{
item
}}"
state
:
directory
recurse
:
yes
group
:
"
{{
themes_group
}}"
mode
:
"
g+rw"
with_items
:
additional_theme_dirs
when
:
additional_theme_dirs is defined
tags
:
-
install
-
install:base
-
name
:
Add theme users to theme's group so that that have read/write access to themes directories
user
:
name
:
"
{{
item
}}"
...
...
playbooks/roles/edxapp/meta/main.yml
View file @
36e371f4
...
...
@@ -7,6 +7,4 @@ dependencies:
-
role
:
edx_themes
theme_users
:
-
"
{{
edxapp_user
}}"
additional_theme_dirs
:
-
"
{{
EDXAPP_COMPREHENSIVE_THEME_DIRS
}}"
when
:
"
{{
EDXAPP_ENABLE_COMPREHENSIVE_THEMING
}}"
playbooks/roles/jenkins_worker/meta/main.yml
View file @
36e371f4
...
...
@@ -15,3 +15,19 @@ dependencies:
# dependencies for sitespeed worker
-
role
:
sitespeedio
when
:
sitespeed_worker is defined
# dependencies for android worker
-
role
:
android_sdk
when
:
android_worker is defined
# User/group to manage Android SDK
android_user
:
"
jenkins"
android_group
:
"
jenkins"
# Tarball to download
android_download
:
"
android-sdk_r24.4.1-linux.tgz"
# Checksum of Android SDK (from: https://developer.android.com/studio/index.html#downloads)
android_checksum
:
"
725bb360f0f7d04eaccff5a2d57abdd49061326d"
# path to installed android sdk
android_home
:
"
/opt/android-sdk-linux"
# individual android build targets to be downloaded via the androind sdk manager
android_build_targets
:
-
android-23
playbooks/roles/jenkins_worker/tasks/main.yml
View file @
36e371f4
...
...
@@ -20,3 +20,5 @@
when
:
platform_worker is defined
-
include
:
test_sitespeed_worker.yml
when
:
sitespeed_worker is defined
-
include
:
test_android_worker.yml
when
:
android_worker is defined
playbooks/roles/jenkins_worker/tasks/test_android_worker.yml
0 → 100644
View file @
36e371f4
---
# Test that the Android sdk has been installed to the correct location
-
name
:
Verify Android SDK is installed
shell
:
"
stat
{{
android_home
}}/tools/android"
register
:
android_version
-
assert
:
that
:
-
"
android_version.rc
==
0"
# Test that the necessary build targets for building the edx app have
# been installed.
-
name
:
Verify correct Android build targets installed
shell
:
"
{{
android_home
}}/tools/android
list
target
|tr
'
\n
'
'
'"
register
:
build_targets
-
with_items
:
"
{{
android_build_targets
}}"
assert
:
that
:
-
"
'{{
item
}}'
in
build_targets.stdout"
util/packer/jenkins_worker_android.json
0 → 100644
View file @
36e371f4
{
"variables"
:
{
"aws_access_key"
:
"{{env `AWS_ACCESS_KEY_ID`}}"
,
"aws_secret_key"
:
"{{env `AWS_SECRET_ACCESS_KEY`}}"
,
"playbook_remote_dir"
:
"/tmp/packer-edx-playbooks"
,
"ami"
:
"{{env `JENKINS_WORKER_AMI`}}"
,
"delete_or_keep"
:
"{{env `DELETE_OR_KEEP_AMI`}}"
,
"remote_branch"
:
"{{env `REMOTE_BRANCH`}}"
},
"builders"
:
[{
"type"
:
"amazon-ebs"
,
"access_key"
:
"{{user `aws_access_key`}}"
,
"secret_key"
:
"{{user `aws_secret_key`}}"
,
"ami_name"
:
"jenkins_worker_android-{{isotime | clean_ami_name}}"
,
"instance_type"
:
"m3.large"
,
"region"
:
"us-east-1"
,
"source_ami"
:
"{{user `ami`}}"
,
"ssh_username"
:
"ubuntu"
,
"ami_description"
:
"jenkins worker android"
,
"iam_instance_profile"
:
"jenkins-worker"
,
"security_group_id"
:
"sg-75af5e18"
,
"tags"
:
{
"delete_or_keep"
:
"{{user `delete_or_keep`}}"
}
}],
"provisioners"
:
[{
"type"
:
"shell"
,
"inline"
:
[
"rm -rf {{user `playbook_remote_dir`}}"
,
"mkdir {{user `playbook_remote_dir`}}"
]
},
{
"type"
:
"file"
,
"source"
:
"../../playbooks/run_role.yml"
,
"destination"
:
"{{user `playbook_remote_dir`}}/run_role.yml"
},
{
"type"
:
"file"
,
"source"
:
"../../playbooks/roles"
,
"destination"
:
"{{user `playbook_remote_dir`}}/roles"
},
{
"type"
:
"file"
,
"source"
:
"../../playbooks/edx-east"
,
"destination"
:
"{{user `playbook_remote_dir`}}/edx-east"
},
{
"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 ./ansible-bootstrap.sh"
]
},
{
"type"
:
"ansible-local"
,
"playbook_file"
:
"../../playbooks/edx-east/jenkins_worker_android.yml"
,
"playbook_dir"
:
"../../playbooks"
,
"command"
:
"source /edx/app/edx_ansible/venvs/edx_ansible/bin/activate && ansible-playbook"
,
"inventory_groups"
:
"jenkins_worker"
,
"extra_arguments"
:
[
"-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