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
b6bd7696
Commit
b6bd7696
authored
Jul 17, 2018
by
Douglas Hall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Dockerfile for microfrontend deployment Go agents.
parent
cacd6e8b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
0 deletions
+78
-0
docker/build/go-agent-frontend/Dockerfile
+4
-0
docker/build/go-agent-frontend/README.rst
+73
-0
util/parsefiles_config.yml
+1
-0
No files found.
docker/build/go-agent-frontend/Dockerfile
0 → 100644
View file @
b6bd7696
FROM
edxops/go-agent:latest
RUN
curl
-sL
https://deb.nodesource.com/setup_8.x |
sudo
-E
bash -
&&
\
apt-get update
&&
apt-get install
-y
nodejs
docker/build/go-agent-frontend/README.rst
0 → 100644
View file @
b6bd7696
Usage
#####
Start the container with this:
``docker run -d --network=edxgomatic_go-network -e GO_SERVER_URL=https://go-server:8154/go go-agent-frontend:latest``
If you need to start a few GoCD agents together, you can of course use the
shell to do that. Start a few agents in the background, like this:
``for each in 1 2 3; do docker run -d --link angry_feynman:go-server edx/go-agent-frontend; done``
Getting into the container
##########################
Sometimes, you need a shell inside the container (to create test repositories,
etc). docker provides an easy way to do that:
``docker exec -i -t CONTAINER-ID /bin/bash``
To check the agent logs, you can do this:
``docker exec -i -t CONTAINER-ID tail -f /var/log/go-agent/go-agent.log``
Agent Configuration
###################
The go-agent expects it's configuration to be found at
``/var/lib/go-agent/config/``. Sharing the configuration between containers is
done by mounting a volume at this location that contains any configuration
files necessary.
**Example docker run command:**
``docker run -ti -v /tmp/go-agent/conf:/var/lib/go-agent/config -e GO_SERVER=gocd.sandbox.edx.org 718d75c467c0 bash``
`How to setup auto registration for remote agents`_
Building and Uploading the container to ECS
###########################################
- Build and tag the go-agent docker image
- Follow the README in the go-agent directory to build and tag for go-agent.
- Create image
- This must be run from the root of the configuration repository
- ``docker build -f docker/build/go-agent-frontend/Dockerfile .``
- or
- ``make docker.test.go-agent-frontend``
- Log docker in to AWS
- Assume the role of the account you wish to log in to
- ``source assume_role.sh <account name>``
- ``sh -c `aws ecr get-login --region us-east-1```
- You might need to remove the ``-e`` option returned by that command in
order to successfully login.
- Tag image
- ``docker tag <image_id> ############.dkr.ecr.us-east-1.amazonaws.com/prod-tools-goagent-frontend:latest``
- ``docker tag <image_id> ############.dkr.ecr.us-east-1.amazonaws.com/prod-tools-goagent-frontend:<version_number>``
- upload:
- ``docker push ############.dkr.ecr.us-east-1.amazonaws.com/edx/release-pipeline/prod-tools-goagent-frontend:latest``
- ``docker push ############.dkr.ecr.us-east-1.amazonaws.com/edx/release-pipeline/prod-tools-goagent-frontend:<version_number>``
.. _How to setup auto registration for remote agents: https://docs.go.cd/current/advanced_usage/agent_auto_register.html
util/parsefiles_config.yml
View file @
b6bd7696
...
...
@@ -8,6 +8,7 @@ weights:
-
discovery
:
6
-
go-agent
:
3
-
go-server
:
5
-
go-agent-frontend
:
4
-
go-agent-marketing
:
4
-
xqwatcher
:
3
-
analytics_api
:
1
...
...
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