Add Makefile and update manifest and docs

This commit is contained in:
IamTheFij 2017-04-19 01:24:23 +00:00
parent 67af05fe2c
commit 874e819351
7 changed files with 60 additions and 24 deletions

View File

@ -1,10 +1,12 @@
{
"id": "com.concourse",
"id": "io.concourse.cloudron",
"title": "Concourse",
"description": "Automated CI tool",
"tagline": "Deploy it all",
"author": "Ian Fijolek <ian@iamthefij.com>",
"website": "https://ghost.iamthefij.com/",
"description": "file://DESCRIPTION.md",
"tagline": "CI that scales with your project",
"postInstallMessage": "file://POSTINSTALL.md",
"icon": "file://logo.png",
"author": "Concourse Developers",
"website": "https://concourse.ci/",
"version": "0.0.1",
"healthCheckPath": "/",
"httpPort": 8080,

24
Makefile Normal file
View File

@ -0,0 +1,24 @@
.PHONY: build
default: build
build:
cloudron build
install: build
cloudron install
uninstall:
cloudron uninstall
run: install
cloudron logs && cloudron logs -f
debug:
cloudron configure --debug
no-debug:
cloudron configure --no-debug
startworker:
./concourse_worker.sh

View File

@ -1,11 +1,13 @@
# Postinstall
### Running workers
In order to run builds, you will need to set up a worker somewhere. Since this requires `sudo` and/or Docker running as `privileged`, it cannot be started by Cloudron and requires this manual step. It's easiest to do this with Docker on the same host. Executing the following commands will start up your worker connected to your main Concourse application.
tsa_container=$(cloudron list | awk '/com.concourse/{print $1;}')
tsa_container=$(cloudron list | awk '/io.concourse.cloudron/{print $1;}')
tsa_hostname=$(cloudron exec --app $tsa_container env | grep HOSTNAME | sed s/.*=//)
tsa_port=$(cloudron exec --app $tsa_container env | grep TSA_PORT | sed s/.*=//)
docker run \
--rm \
--name concourse_worker \
--privileged \
--network cloudron \
--volumes-from $tsa_container \
@ -17,8 +19,8 @@ In order to run builds, you will need to set up a worker somewhere. Since this r
If you wish to do this with the binary or on another server, you will need to download your keys to facilitate the connection. This can be done using the following commands:
cloudron pull /app/data/worker_key
cloudron pull /app/data/tsa_host_key.pub
cloudron pull /app/data/worker_key ./
cloudron pull /app/data/tsa_host_key.pub ./
Then run a worker either with the binary, you should be able to execute the following from any server:

View File

@ -1,3 +1,7 @@
# concourse-app
Cloudron packaged version of Concourse TSA
Cloudron packaged version of Concourse ATC/TSA
### Legal
Concourse is a trademark of Concourse in the U.S. and other countries.

View File

@ -1,10 +1,12 @@
#! /bin/bash
tsa_container=$(cloudron list | awk '/com.concourse/{print $1;}')
# This is used to debug and will not daemonize or restart
# To run this in production remove the `--rm` flag and replace with `-d --restart unless-stopped`
tsa_container=$(cloudron list | awk '/io.concourse.cloudron/{print $1;}')
tsa_hostname=$(cloudron exec --app $tsa_container env | grep HOSTNAME | sed s/.*=//)
tsa_port=$(cloudron exec --app $tsa_container env | grep TSA_PORT | sed s/.*=//)
sudo docker run --rm \
sudo docker run -d \
--name concourse_worker \
--privileged \
--network cloudron \
--volumes-from $tsa_container \

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -1,9 +1,7 @@
#! /bin/bash
set -e
# Chown necessary directories here since these are volumes
chown -R cloudron:cloudron /app/data /run
# Verify init with keys
if ! [ -f /app/data/.initialized ]; then
echo "First time init!"
@ -14,10 +12,14 @@ if ! [ -f /app/data/.initialized ]; then
cp /app/data/worker_key.pub /app/data/authorized_worker_keys
touch /app/data/.initialized
echo "Done with init. Starting"
else
echo "Already initialized. Starting"
fi
# Chown necessary directories here since these are volumes
chown -R cloudron:cloudron /app/data /run
export CONCOURSE_EXTERNAL_URL=$APP_ORIGIN
export CONCOURSE_POSTGRES_HOST=$POSTGRESQL_HOST
export CONCOURSE_POSTGRES_PORT=$POSTGRESQL_PORT