Skip to content

Commit

Permalink
Merge branch 'release/0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubig committed Apr 30, 2015
2 parents 080b16b + 4b7f1e4 commit f54b57b
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 37 deletions.
52 changes: 38 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,57 @@
## Atlassian services

Version: 0.1.0

This repository holds a dockerized orchestration of the Atlassian web apps
Jira, Stash and Confluence. To simplify the usermangement Crowd is also
included. For more information on the apps please refere to the offical
Atlassian websites:

- [Jira](https://www.atlassian.com/software/jira)
- [Stash](https://www.atlassian.com/software/stash)
- [Confluence](https://www.atlassian.com/software/confluence)
- [Crowd](https://www.atlassian.com/software/crowd)
- [Jira][1]
- [Stash][2]
- [Confluence][3]
- [Crowd][4]

### Prerequisites

In order to run this apps you need to make sure you're running at least
[docker 1.3.1](https://docker.com) and [fig 1.0.1](http://fig.sh). For
detailed installation instructions please refere to the origin websites:
[docker 1.6.0][5] and [docker-compose 1.2.0][6]. For detailed installation
instructions please refere to the origin websites:

- [http://docs.docker.com/installation](http://docs.docker.com/installation)
- [http://www.fig.sh/install.html](http://www.fig.sh/install.html)
- [https://docs.docker.com/installation][7]
- [https://docs.docker.com/compose][8]

### Deploy/Update the application

# rebuild the docker images
$ fig build
$ docker-compose build

# restart the docker images
$ fig up -d
# start the docker images
$ docker-compose up -d

# inspect the logs
$ fig logs
$ docker-compose logs

If you deploy the apps for the first time you may need to restore the database
from a backup for each app and adapt the database connection settings!

### Debug (aka. go inside) an image
### Develop Mode / Debug an image

# start in development mode
$ docker-compose -f docker-compose-dev.yml up

# execute a bash shell
# execute a bash shell inside a running container
$ docker exec -it atlassian_stash_1 bash

# add the following entrys to your `/etc/hosts`
$ boot2docker ip -> 192.168.59.103
$ cat /etc/hosts
192.168.59.103 boot2docker.local boot2docker
192.168.59.103 stash.boot2docker.local stash
192.168.59.103 jira.boot2docker.local jira
192.168.59.103 docs.boot2docker.local docs
192.168.59.103 crowd.boot2docker.local crowd

### First run

If you start this orchestration for the first time, a handy feature is to
Expand Down Expand Up @@ -101,3 +115,13 @@ will pick them up automagically on the first run.
postgres sh -c 'pg_restore -U crowd -h "$DB_PORT_5432_TCP_ADDR" \
-n public -w -d crowd /tmp/crowd.dump'

---
[1]: https://www.atlassian.com/software/jira
[2]: https://www.atlassian.com/software/stash
[3]: https://www.atlassian.com/software/confluence
[4]: https://www.atlassian.com/software/crowd
[5]: https://docker.com
[6]: https://docs.docker.com/compose
[7]: https://docs.docker.com/installation
[8]: https://docs.docker.com/compose/#installation-and-set-up

35 changes: 35 additions & 0 deletions bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

VERSION_FILE='README.md'
VERSION_TEMP='README.tmp'

function usage () {
echo "usage: bump-version <version-id>"
}

function update_version () {
sed -e "s/^ Version: .*$/ Version: $1/g" \
$VERSION_FILE > $VERSION_TEMP
}

function commit_version () {
git add $VERSION_FILE
git commit -m "Bumped version number to $1."
}

if [ $# -ne 1 ]; then
usage
exit 1
fi

if ! update_version $1; then
echo "Could not bump the version!" >&2
exit 2
else
mv $VERSION_TEMP $VERSION_FILE
fi

if ! commit_version $1; then
echo "Could not commit the version!" >&2
exit 2
fi
22 changes: 8 additions & 14 deletions fig.yml → docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
nginx:
hostname: nginx
build: docker/nginx
restart: no
ports:
- "80:80"
- "443:443"
Expand All @@ -11,8 +11,8 @@ nginx:
- crowd

stash:
hostname: stash
build: docker/stash
restart: no
ports:
- "7990:7990" # no cache
- "7999:7999" # ssh port
Expand All @@ -22,8 +22,8 @@ stash:
- stash-home:/opt/stash-home

jira:
hostname: jira
build: docker/jira
restart: no
ports:
- "8080:8080" # no cache
links:
Expand All @@ -32,8 +32,8 @@ jira:
- jira-home:/opt/jira-home

confluence:
hostname: confluence
build: docker/confluence
restart: no
ports:
- "8090:8090" # no cache
links:
Expand All @@ -42,8 +42,8 @@ confluence:
- confluence-home:/opt/confluence-home

crowd:
hostname: crowd
build: docker/crowd
restart: no
ports:
- "8095:8095" # no cache
links:
Expand All @@ -52,14 +52,8 @@ crowd:
- crowd-home:/opt/crowd-home

database:
hostname: database
build: docker/postgres
image: postgres:9.4
restart: no
volumes:
- docker/postgres:/docker-entrypoint-initdb.d
- tmp:/tmp # import backups
volumes_from:
- persistent

persistent:
image: busybox
volumes:
- /var/lib/postgresql/data
60 changes: 60 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
nginx:
build: docker/nginx
restart: always
ports:
- "80:80"
- "443:443"
links:
- stash
- jira
- confluence
- crowd

stash:
build: docker/stash
restart: always
ports:
- "7990:7990" # no cache
- "7999:7999" # ssh port
links:
- database
volumes:
- stash-home:/opt/stash-home

jira:
build: docker/jira
restart: always
ports:
- "8080:8080" # no cache
links:
- database
volumes:
- jira-home:/opt/jira-home

confluence:
build: docker/confluence
restart: always
ports:
- "8090:8090" # no cache
links:
- database
volumes:
- confluence-home:/opt/confluence-home

crowd:
build: docker/crowd
restart: always
ports:
- "8095:8095" # no cache
links:
- database
volumes:
- crowd-home:/opt/crowd-home

database:
image: postgres:9.4
restart: always
volumes:
- data:/var/lib/postgresql/data
- docker/postgres:/docker-entrypoint-initdb.d
- tmp:/tmp # import backups
11 changes: 7 additions & 4 deletions docker/confluence/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
FROM dockerfile/java:oracle-java7

ENV CONFLUENCE_VERSION 5.6.5
ENV CONFLUENCE_VERSION 5.7.1
ENV CONFLUENCE_HOME /opt/confluence-home

RUN useradd --create-home --home-dir /opt/confluence \
--shell /bin/bash confluence
RUN mkdir /opt/confluence-home && \
chown -R confluence:confluence /opt/confluence-home
RUN wget -O - \
http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz \
| tar xzf - --strip=1 -C /opt/confluence \
http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz \
| tar xzf - --strip=1 -C /opt/confluence \
&& perl -i -p -e 's/-Xms1024m/-Xms128m/' /opt/confluence/bin/setenv.sh \
&& perl -i -p -e 's/-Xmx1024m/-Xmx512m/' /opt/confluence/bin/setenv.sh \
&& perl -i -p -e 's/_%T//' /opt/confluence/bin/setenv.sh \
&& echo "confluence.home = ${CONFLUENCE_HOME}" > \
/opt/confluence/confluence/WEB-INF/classes/confluence-init.properties \
/opt/confluence/confluence/WEB-INF/classes/confluence-init.properties \
&& chown -R confluence:confluence /opt/confluence

WORKDIR /opt/confluence
Expand Down
5 changes: 0 additions & 5 deletions docker/postgres/Dockerfile

This file was deleted.

4 changes: 4 additions & 0 deletions postgres-data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

0 comments on commit f54b57b

Please sign in to comment.