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", "title": "Concourse",
"description": "Automated CI tool", "description": "file://DESCRIPTION.md",
"tagline": "Deploy it all", "tagline": "CI that scales with your project",
"author": "Ian Fijolek <ian@iamthefij.com>", "postInstallMessage": "file://POSTINSTALL.md",
"website": "https://ghost.iamthefij.com/", "icon": "file://logo.png",
"author": "Concourse Developers",
"website": "https://concourse.ci/",
"version": "0.0.1", "version": "0.0.1",
"healthCheckPath": "/", "healthCheckPath": "/",
"httpPort": 8080, "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. 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_hostname=$(cloudron exec --app $tsa_container env | grep HOSTNAME | sed s/.*=//)
tsa_port=$(cloudron exec --app $tsa_container env | grep TSA_PORT | sed s/.*=//) tsa_port=$(cloudron exec --app $tsa_container env | grep TSA_PORT | sed s/.*=//)
docker run \ docker run \
--rm \
--name concourse_worker \
--privileged \ --privileged \
--network cloudron \ --network cloudron \
--volumes-from $tsa_container \ --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: 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/worker_key ./
cloudron pull /app/data/tsa_host_key.pub 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: 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 # 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,15 +1,17 @@
#! /bin/bash #! /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_hostname=$(cloudron exec --app $tsa_container env | grep HOSTNAME | sed s/.*=//)
tsa_port=$(cloudron exec --app $tsa_container env | grep TSA_PORT | sed s/.*=//) tsa_port=$(cloudron exec --app $tsa_container env | grep TSA_PORT | sed s/.*=//)
sudo docker run -d \
sudo docker run --rm \ --name concourse_worker \
--privileged \ --privileged \
--network cloudron \ --network cloudron \
--volumes-from $tsa_container \ --volumes-from $tsa_container \
concourse/concourse worker \ concourse/concourse worker \
--tsa-host $tsa_hostname \ --tsa-host $tsa_hostname \
--tsa-port $tsa_port \ --tsa-port $tsa_port \
--tsa-public-key /app/data/tsa_host_key.pub \ --tsa-public-key /app/data/tsa_host_key.pub \
--tsa-worker-private-key /app/data/worker_key --tsa-worker-private-key /app/data/worker_key

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

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