Unverified Commit 4393df16 by Isabel Committed by GitHub

Merge pull request #4618 from edx/ikaspriskie/gocd_dev_environment

Initial commit for gocd dev environment
parents 1b9b9366 81dcc0c9
# Build using: docker build -f Dockerfile.gocd-agent -t gocd-agent .
# To run, use the command docker build . -f docker/build/go-agent/Dockerfile --tag edx-ops/go-agent:latest
# https://hub.docker.com/r/gocd/gocd-agent-ubuntu-14.04/
FROM gocd/gocd-agent-ubuntu-14.04:v17.10.0
......
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
USER root
ADD . /edx/app/edx_ansible/edx_ansible
WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
COPY docker/build/go-server/ansible_overrides.yml /ansible_overrides.yml
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook go-server.yml \
-c local -i '127.0.0.1,' \
-t 'install,assets,devstack' \
--extra-vars="@/ansible_overrides.yml"
EXPOSE 8153 8154
---
GO_SERVER_ADMIN_USERNAME: "admin"
GO_SERVER_ADMIN_PASSWORD: "admin"
version: '3'
services:
go-server:
build:
context: ../../../.
dockerfile: docker/build/go-server/Dockerfile
image: edxops/go-server:latest
command: java -server -Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx1024m -XX:MaxMetaspaceSize=256m -Xmx1024m -Dgo.config.repo.gc.periodic=Y -Duser.language=en -Djruby.rack.request.size.threshold.bytes=30000000 -Duser.country=US -Dcruise.config.dir=/etc/go -Dcruise.config.file=/etc/go/cruise-config.xml -Dcruise.server.port=8153 -Dcruise.server.ssl.port=8154 -jar /usr/share/go-server/go.jar
ports:
- '127.0.0.1:8153:8153'
networks:
- go-network
go-agent:
build:
context: ../../../.
dockerfile: docker/build/go-agent/Dockerfile
image: edxops/go-agent:latest
networks:
- go-network
environment:
GO_SERVER_URL: https://go-server:8154/go
networks:
go-network:
driver: bridge
# ansible-playbook -i 'admin.edx.org,' ./hotg.yml -e@/path/to/ansible/vars/edx.yml -e@/path/to/secure/ansible/vars/edx_admin.yml
- name: Install go-server
hosts: all
become: True
gather_facts: True
roles:
- aws
- supervisor
- go-server
......@@ -34,17 +34,23 @@
apt_repository:
repo: "{{ GO_AGENT_APT_SOURCE }}"
state: present
tags:
- install
- name: Install aptitude key for go-agent/go-agent
apt_key:
url: "{{ GO_AGENT_APT_KEY_URL }}"
state: present
tags:
- install
- name: Install go-agent using apt-get
apt:
name: "{{ GO_AGENT_APT_NAME }}={{ GO_AGENT_VERSION }}"
update_cache: yes
state: present
tags:
- install
- name: Install go-agent configuration
template:
......@@ -53,8 +59,12 @@
mode: "0644"
owner: "{{ GO_AGENT_USER }}"
group: "{{ GO_AGENT_GROUP }}"
tags:
- install
- name: Restart go-agent
service:
name: "{{ GO_AGENT_SERVICE_NAME }}"
state: restarted
tags:
- install
......@@ -34,16 +34,25 @@
apt_repository:
repo: "{{ GO_SERVER_APT_SOURCE }}"
state: present
tags:
- install
- install:base
- name: install aptitude key for go-server/go-server
apt_key:
url: "{{ GO_SERVER_APT_KEY_URL }}"
state: present
tags:
- install
- install:base
- name: install openjdk ppa repository
apt_repository:
repo: "{{ openjdk_apt_source }}"
state: present
tags:
- install
- install:base
- name: install other needed system packages
apt:
......@@ -52,12 +61,18 @@
update_cache: true
cache_valid_time: 3600
with_items: "{{ GO_SERVER_APT_PKGS }}"
tags:
- install
- install:base
- name: install go-server using apt-get
apt:
name: "{{ GO_SERVER_APT_NAME }}={{ GO_SERVER_VERSION }}"
update_cache: yes
state: present
tags:
- install
- install:base
- name: create go-server plugin directory
file:
......@@ -66,6 +81,9 @@
mode: 0776
owner: "{{ GO_SERVER_USER }}"
group: "{{ GO_SERVER_GROUP }}"
tags:
- install
- install:base
- name: install go-server plugins
get_url:
......@@ -78,6 +96,9 @@
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 }}" }
tags:
- install
- install:base
- name: install go-server configuration
template:
......@@ -87,6 +108,9 @@
owner: "{{ GO_SERVER_USER }}"
group: "{{ GO_SERVER_GROUP }}"
force: no
tags:
- install
- install:base
- name: ensure everyone can read go-server log files
file:
......@@ -171,7 +195,7 @@
- install
- install:app-configuration
- name: restart go-server
- name: Restart go-server
service:
name: "{{ GO_SERVER_SERVICE_NAME }}"
state: restarted
......
......@@ -35,7 +35,7 @@ To modify configuration file:
For example, if adding Dockerfile for ecommerce, rabbit mq, replace
``images:=$(shell git diff --name-only $(TRAVIS_COMMIT_RANGE) | python util/parsefiles.py)``
``images:=$(if $(TRAVIS_COMMIT_RANGE),$(shell git diff --name-only $(TRAVIS_COMMIT_RANGE) | python util/parsefiles.py),$(all_images))``
with
......
......@@ -7,6 +7,7 @@ docker_plays_paths:
weights:
- discovery: 6
- go-agent: 3
- go-server: 5
- go-agent-marketing: 4
- xqwatcher: 3
- analytics_api: 1
......@@ -38,4 +39,3 @@ weights:
- analytics_pipeline_hadoop_resourcemanager: 2
- analytics_pipeline_spark_master: 1
- analytics_pipeline_spark_worker: 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment