├── Dockerfile ├── README.md ├── init.sh ├── install_cmds.sh ├── node.json └── response.varfile /Dockerfile: -------------------------------------------------------------------------------- 1 | # Install Atlassian Jira 2 | # This is a trusted build based on the "base" image, but we also need postgresql 3 | FROM linuxkonsult/postgres 4 | 5 | MAINTAINER Tom Eklöf tom@linux-konsult.com 6 | 7 | ENV AppName jira-software 8 | ENV AppVer 7.1.9 9 | ENV Arch x64 10 | 11 | # Fetch the files 12 | ADD http://www.atlassian.com/software/jira/downloads/binary/atlassian-$AppName-$AppVer-$Arch.bin /opt/ 13 | ADD ./install_cmds.sh /install_cmds.sh 14 | ADD ./node.json /etc/chef/node.json 15 | ADD ./response.varfile /opt/response.varfile 16 | ADD ./init.sh /init.sh 17 | ADD ./install_cmds.sh /install_cmds.sh 18 | 19 | ## Now Install Atlassian Jira 20 | RUN /install_cmds.sh 21 | 22 | # Start the service 23 | CMD ["sh", "/init.sh"] 24 | EXPOSE 8080 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Docker + Chef Solo + Postgresql + Jira = Love! 2 | 3 | License and Authors 4 | ------------------- 5 | Author: Tom Eklöf 6 | I am in no way affiliated with company Atlassian® or the Jira® product. 7 | 8 | 9 | Description 10 | ----------- 11 | This is Jira image with Postgresql. 12 | 13 | Requirements 14 | ------------ 15 | 16 | Configuration 17 | ------------- 18 | Database Type: PostgreSQL 19 | Hostname: localhost 20 | Database: jiradb 21 | DBuser: postgres 22 | 23 | 24 | Contributing 25 | ------------ 26 | 27 | 1. Fork the repository on Github 28 | 2. Create a named feature branch (like `add_component_x`) 29 | 3. Write your change 30 | 4. Submit a Pull Request using Github 31 | 32 | -------------------------------------------------------------------------------- /init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start the postgres server 4 | sysctl -w kernel.shmmax=714219520 5 | /postgres.sh & 6 | 7 | # Start Atlassian Jira in the forground 8 | /opt/atlassian/jira/bin/start-jira.sh -fg 9 | -------------------------------------------------------------------------------- /install_cmds.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #set -x 3 | # Install Atlassian Jira 4 | ## Install Java 5 | # Add Oracle Java PPA 6 | apt-get -y update 7 | apt-get -y install software-properties-common 8 | add-apt-repository -y ppa:webupd8team/java 9 | apt-get -y update 10 | # Auto-accept the Oracle License 11 | echo "debconf shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections 12 | echo "debconf shared/accepted-oracle-license-v1-1 seen true" | debconf-set-selections 13 | apt-get -y install libpq-dev oracle-java8-installer 14 | 15 | # Add the Jira cookbook 16 | echo "cookbook 'jira', git: 'https://github.com/proppen/jira'" >> /Berksfile ; /opt/chef/embedded/bin/berks vendor /etc/chef/cookbooks/ 17 | 18 | # Here we make any changes to postgresql for Jira, see cookbook documentation for examples. 19 | sed -i "s%md5sumhash%$(echo -n 'dbpassword' | openssl md5 | sed -e 's/.* /md5/')%g" /etc/chef/node.json 20 | /etc/init.d/postgresql start ; chef-solo ; /etc/init.d/postgresql stop 21 | 22 | ## Now Install Atlassian Jira 23 | sh /opt/atlassian-$AppName-$AppVer-$Arch.bin -q -varfile /opt/response.varfile 24 | 25 | # Clean up 26 | rm -f /var/cache/oracle-jdk8-installer/jdk-*.tar.gz 27 | rm -f /opt/atlassian-$AppName-$AppVer-$Arch.bin 28 | -------------------------------------------------------------------------------- /node.json: -------------------------------------------------------------------------------- 1 | { 2 | "run_list": [ "recipe[postgresql::client]","recipe[postgresql::server]","recipe[postgresql::config_initdb]","recipe[jira::psql-create]" ], 3 | "postgresql": { 4 | "config": { 5 | "listen_addresses": "127.0.0.1", 6 | 7 | "ssl": false 8 | }, 9 | "config_pgtune": { 10 | "db_type": "web" 11 | }, 12 | "pg_hba": [ 13 | { 14 | "type": "local", "db": "all", "user": "all", "addr": "", "method": "trust", 15 | "type": "host", "db": "all", "user": "all", "addr": "127.0.0.0/8", "method": "trust" 16 | } 17 | ], 18 | "password": { 19 | "postgres": "md5sumhash" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /response.varfile: -------------------------------------------------------------------------------- 1 | #install4j response file for JIRA 6.1.2 2 | #Thu Oct 31 15:20:21 UTC 2013 3 | rmiPort$Long=8005 4 | app.jiraHome=/opt/atlassian/jira-home 5 | app.install.service$Boolean=true 6 | existingInstallationDir=/opt/JIRA 7 | sys.confirmedUpdateInstallationString=false 8 | sys.languageId=en 9 | sys.installationDir=/opt/atlassian/jira 10 | executeLauncherAction$Boolean=true 11 | httpPort$Long=8080 12 | portChoice=default 13 | --------------------------------------------------------------------------------