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
edx
configuration
Commits
d29afb94
Commit
d29afb94
authored
Feb 08, 2017
by
Feanil Patel
Committed by
GitHub
Feb 08, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3678 from edx/feanil/gocd_upgrade
Feanil/gocd upgrade
parents
35c55e85
55da5be5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
72 deletions
+14
-72
docker/build/go-agent/Dockerfile
+1
-22
docker/build/go-agent/files/go-agent-env-vars
+0
-12
docker/build/go-agent/files/go-agent-start.sh
+0
-24
playbooks/roles/go-server/defaults/main.yml
+7
-7
playbooks/roles/go-server/tasks/main.yml
+6
-7
No files found.
docker/build/go-agent/Dockerfile
View file @
d29afb94
# Build using: docker build -f Dockerfile.gocd-agent -t gocd-agent .
FROM
gocd/gocd-agent:1
6.5
.0
FROM
gocd/gocd-agent:1
7.1
.0
LABEL
version="0.02" \
description="This custom go-agent docker file installs additional requirements for the edx pipeline"
# Add Custom apt repositories
RUN
\
echo
oracle-java7-installer shared/accepted-oracle-license-v1-1
select
true
| debconf-set-selections
&&
\
add-apt-repository
-y
ppa:webupd8team/java
&&
\
add-apt-repository
-y
'deb http://ppa.edx.org trusty main'
&&
\
apt-key adv
--recv-keys
--keyserver
keyserver.ubuntu.com 69464050
&&
\
apt-get update
# Install Java 7
RUN
\
apt-get install
-y
oracle-java7-installer
&&
\
rm
-rf
/var/lib/apt/lists/
*
&&
\
rm
-rf
/var/cache/oracle-jdk7-installer
# Install a modern git client
RUN
add-apt-repository
-y
ppa:git-core/ppa
&&
\
apt-get update
&&
\
...
...
@@ -26,9 +12,6 @@ RUN add-apt-repository -y ppa:git-core/ppa && \
# Define working directory.
WORKDIR
/data
# Define commonly used JAVA_HOME variable
ENV
JAVA_HOME /usr/lib/jvm/java-7-oracle
# Install Python and package mgmt tools.
RUN
apt-get update
&&
apt-get install
-y
-q
\
python
\
...
...
@@ -81,10 +64,6 @@ RUN \
# Install AWS command-line interface - for AWS operations in a go-agent task.
RUN
pip install awscli
ADD
docker/build/go-agent/files/go-agent-start.sh /etc/service/go-agent/run
ADD
docker/build/go-agent/files/go-agent-env-vars /etc/default/go-agent
RUN
update-java-alternatives
-s
java-7-oracle
# !!!!NOTICE!!!! ---- Runner of this pipeline take heed!! You must replace go_github_key.pem with the REAL key material
# that can checkout private github repositories used as pipeline materials. The key material here is faked and is only
# used to pass CI!
...
...
docker/build/go-agent/files/go-agent-env-vars
deleted
100644 → 0
View file @
35c55e85
GO_SERVER=127.0.0.1
export GO_SERVER
GO_SERVER_PORT=8153
export GO_SERVER_PORT
GO_SERVER_SSL_PORT=8154
export GO_SERVER_SSL_PORT
AGENT_WORK_DIR=/var/lib/${SERVICE_NAME:-go-agent}
export AGENT_WORK_DIR
DAEMON=N
VNC=N
export JAVA_HOME="/usr/lib/jvm/java-7-oracle/jre" # SET_BY_GO_INSTALLER__DONT_REMOVE
\ No newline at end of file
docker/build/go-agent/files/go-agent-start.sh
deleted
100755 → 0
View file @
35c55e85
#!/bin/bash
GO_SERVER
=
${
GO_SERVER
:-
go
-server
}
GO_SERVER_PORT
=
${
GO_SERVER_PORT
:-
go
-server-port
}
COLOR_START
=
"[01;34m"
COLOR_END
=
"[00m"
echo
-e
"
${
COLOR_START
}
Starting Go Agent to connect to server
$GO_SERVER
:
$GO_SERVER_PORT
...
${
COLOR_END
}
"
sed
-i
-e
's/GO_SERVER=.*/GO_SERVER='
$GO_SERVER
'/'
/etc/default/go-agent
sed
-i
-e
's/GO_SERVER_PORT=.*/GO_SERVER_PORT='
$GO_SERVER_PORT
'/'
/etc/default/go-agent
sed
-i
-e
's/GO_SERVER_SSL_PORT=.*/GO_SERVER_SSL_PORT='
$GO_SERVER_SSL_PORT
'/'
/etc/default/go-agent
mkdir
-p
/var/lib/go-agent/config
/bin/rm
-f
/var/lib/go-agent/config/autoregister.properties
AGENT_KEY
=
"
${
AGENT_KEY
:-
123456789abcdef
}
"
echo
"agent.auto.register.key=
$AGENT_KEY
"
>
/var/lib/go-agent/config/autoregister.properties
if
[
-n
"
$AGENT_RESOURCES
"
]
;
then
echo
"agent.auto.register.resources=
$AGENT_RESOURCES
"
>>
/var/lib/go-agent/config/autoregister.properties
;
fi
if
[
-n
"
$AGENT_ENVIRONMENTS
"
]
;
then
echo
"agent.auto.register.environments=
$AGENT_ENVIRONMENTS
"
>>
/var/lib/go-agent/config/autoregister.properties
;
fi
/sbin/setuser go /etc/init.d/go-agent start
\ No newline at end of file
playbooks/roles/go-server/defaults/main.yml
View file @
d29afb94
...
...
@@ -13,23 +13,23 @@
GO_SERVER_SERVICE_NAME
:
"
go-server"
GO_SERVER_USER
:
"
go"
GO_SERVER_GROUP
:
"
{{
GO_SERVER_USER
}}"
GO_SERVER_VERSION
:
"
1
6.5.0-3305
"
GO_SERVER_VERSION
:
"
1
7.1.0-4511
"
GO_SERVER_HOME
:
"
/var/lib/go-server"
GO_SERVER_CONF_HOME
:
"
/etc/go"
GO_SERVER_PLUGIN_DIR
:
"
{{
GO_SERVER_HOME
}}/plugins/external/"
# Java version settings
GO_SERVER_ORACLEJDK_VERSION
:
"
7u80
"
GO_SERVER_ORACLEJDK_BASE
:
"
jdk1.
7.0_80
"
GO_SERVER_ORACLEJDK_BUILD
:
"
b1
5
"
GO_SERVER_ORACLEJDK_LINK
:
"
/usr/lib/jvm/java-
7
-oracle"
GO_SERVER_ORACLEJDK_VERSION
:
"
8u65
"
GO_SERVER_ORACLEJDK_BASE
:
"
jdk1.
8.0_65
"
GO_SERVER_ORACLEJDK_BUILD
:
"
b1
7
"
GO_SERVER_ORACLEJDK_LINK
:
"
/usr/lib/jvm/java-
8
-oracle"
# java tuning
GO_SERVER_JAVA_HOME
:
"
{{
GO_SERVER_ORACLEJDK_LINK
}}"
# Aptitude settings
GO_SERVER_APT_SOURCE
:
"
deb
https://download.go
.cd
/"
GO_SERVER_APT_KEY_URL
:
"
https://download.go
.cd
/GOCD-GPG-KEY.asc"
GO_SERVER_APT_SOURCE
:
"
deb
https://download.go
cd.io
/"
GO_SERVER_APT_KEY_URL
:
"
https://download.go
cd.io
/GOCD-GPG-KEY.asc"
GO_SERVER_APT_NAME
:
"
go-server"
GO_SERVER_APT_PKGS
:
[
"
apache2-utils"
]
...
...
playbooks/roles/go-server/tasks/main.yml
View file @
d29afb94
...
...
@@ -16,7 +16,7 @@
# Deploys go-server using aptitude!
#
# Dependencies:
# - openjdk
7
# - openjdk
8
#
# Example play:
#
...
...
@@ -69,8 +69,7 @@
mode
:
0776
owner
:
"
{{
GO_SERVER_USER
}}"
group
:
"
{{
GO_SERVER_GROUP
}}"
# uncomment ansible has been upgraded to 2.0+
# checksum=md5:{{ item.md5 }}
checksum
:
"
md5:{{
item.md5
}}"
with_items
:
-
{
url
:
"
{{
GO_SERVER_OAUTH_LOGIN_JAR_URL
}}"
,
md5
:
"
{{
GO_SERVER_OAUTH_LOGIN_MD5
}}"
}
-
{
url
:
"
{{
GO_SERVER_GITHUB_PR_PLUGIN_JAR_URL
}}"
,
md5
:
"
{{
GO_SERVER_GITHUB_PR_PLUGIN_MD5
}}"
}
...
...
@@ -98,7 +97,7 @@
owner
:
"
{{
GO_SERVER_USER
}}"
group
:
"
{{
GO_SERVER_GROUP
}}"
force
:
no
when
:
GO_SERVER_ADMIN_PASSWORD and GO_SERVER_BACKUP_PASSWORD
AND
GO_SERVER_GOMATIC_PASSWORD
when
:
GO_SERVER_ADMIN_PASSWORD and GO_SERVER_BACKUP_PASSWORD
and
GO_SERVER_GOMATIC_PASSWORD
-
name
:
install go-server configuration
template
:
...
...
@@ -118,9 +117,9 @@
regexp
:
"
^{{
item.username
}}"
line
:
"
{{
item.password_hash.stdout
}}"
with_items
:
-
{
username
:
GO_SERVER_ADMIN_USERNAME
,
password
:
GO_SERVER_ADMIN_PASSWORD
,
password_hash
:
admin_user_password_line
}
-
{
username
:
GO_SERVER_BACKUP_USERNAME
,
password
:
GO_SERVER_BACKUP_PASSWORD
,
password_hash
:
backup_user_password_line
}
-
{
username
:
GO_SERVER_GOMATIC_USERNAME
,
password
:
GO_SERVER_GOMATIC_PASSWORD
,
password_hash
:
gomatic_user_password_line
}
-
{
username
:
"
{{
GO_SERVER_ADMIN_USERNAME
}}"
,
password
:
"
{{
GO_SERVER_ADMIN_PASSWORD
}}"
,
password_hash
:
"
{{
admin_user_password_line
}}"
}
-
{
username
:
"
{{
GO_SERVER_BACKUP_USERNAME
}}"
,
password
:
"
{{
GO_SERVER_BACKUP_PASSWORD
}}"
,
password_hash
:
"
{{
backup_user_password_line
}}"
}
-
{
username
:
"
{{
GO_SERVER_GOMATIC_USERNAME
}}"
,
password
:
"
{{
GO_SERVER_GOMATIC_PASSWORD
}}"
,
password_hash
:
"
{{
gomatic_user_password_line
}}"
}
when
:
item.username and item.password and item.password_hash
-
name
:
install ssh key for the secure repos
...
...
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