Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Atlassian JIRA & Confluence on Synology 1513+ running DSM 5.1-5022 with 4GB RAM
- Rev 0.01
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-
- NOTE: This is a work in progress.
- Unfinished:
- 01 - I'm not sure how I want to handle the service start up and shut down,
- and I don't currently have them working, but have included partial
- notes on what I'm poking at currently.
- 02 - FishEye, Crucible, and Bamboo aren't currently covered. I'm currently
- testing how well the DS1513+ handles the load of JIRA & Confluence @ 4GB.
- NOTE2: Much of my life is spent standing on the shoulder's of giants, beyond
- some minor tweaking and testing much of this process was tread by others
- who came before me, and to them I give thanks for sharing their efforts.
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-
- Software Installer Versions
- ==============================================
- atlassian-jira-6.3.13-x32.bin
- atlassian-confluence-5.6.5-x32.bin
- atlassian-bamboo-5.7.2.tar.gz
- fisheye-3.6.3.zip (FishEye & Crucible)
- syno-i686-bootstrap_1.2-7_i686.xsh
- Synology Preparation
- ==============================================
- Official Packages:
- [Need to dig, have added many packages prior to beginning this activity, unknown if any are silent pre-requisites]
- Community Packages:
- phpPgAdmin - Not critical, but handy to look at the associated databases and check their basic functionality.
- [ https://yadi.sk/d/CmnolK-gduQ7n mercurial-evanpost.1.0.1-1.spk ??? no versioning in place yet - evaluate - there WAS a community mercurial package, but the synocommunity package store is down until 1/22 ]
- Issues:
- A - Want phpPgAdmin to manage PostgreSQL (install community package)
- B - No bash shell provided by default
- C - Need ipkg to install bash and other optional software, use Optware:
- ===============
- 01 INSTALL OPTWARE
- ===============
- References:
- http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc
- For the Intel Atom CPU D2700 Processor in the 1513+ http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh which uses http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/ as its feed.
- The steps to install the Optware bootstrap on a Synology 1513+ (provided as an .xsh file) are below.
- 1) Reboot your Synology 1513+.
- 2) Enable and then Login to the Command Line Interface as user "root", password is the same as for admin.
- 3) Change to a directory such as "/volume1/@tmp", i.e. enter the command "cd /volume1/@tmp"
- 4) Get the NAS to download the bootstrap or download the bootstrap to your PC and then copy it to a shared folder on the NAS and move it into /volume1/@tmp
- wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh
- 5) Set the .xsh script to be executable "chmod +x syno-i686-bootstrap_1.2-7_i686.xsh"
- 6) Now run the .xsh script, enter the command "sh syno-i686-bootstrap_1.2-7_i686.xsh"
- 7) After the script has finished you can delete the script file, enter the command "rm syno-i686-bootstrap_1.2-7_i686.xsh"
- 8) The root profile's PATH needs to be modified such that /opt/bin and /opt/sbin are prepended to the PATH. By default root's .profile overwrites the current path, so in the /root/.profile file, comment out the following lines:
- #PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
- #export PATH
- NOTE 1: The bootstrap installer adds part of the necessary PATH change to /etc/profile automatically. In case a DSM update breaks it, the line to ensure is at the end of the file is:
- PATH=/opt/bin:/opt/sbin:$PATH
- NOTE 2: Both of these changes may need to be reapplied after future DSM updates.
- Before:
- DiskStation> echo $PATH
- /sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/var/packages/JavaManager/target/Java/bin:/var/packages/JavaManager/target/Java/jre/bin
- After:
- DiskStation> echo $PATH
- /opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/var/packages/JavaManager/target/Java/bin:/var/packages/JavaManager/target/Java/jre/bin
- NOTE 3: If you have an error that /opt cannot be mounted, unmount the previous mount ("umount -f /opt" check with command "mount") and delete both old /opt and /volume1/opt folders.
- 9) Reboot the NAS and login again to the Command Line Interface as user "root".
- 10) Update the ipkg list of available packages using the command "ipkg update"
- 11) Upgrade any ipkg installed packages to the latest versions using the command "ipkg upgrade"
- 12) Finished, you can now install ipkg packages using the command "ipkg install <package name>" where <package name> is the name of the package. You can list all the available packages using the command "ipkg list". As this is a long list you can filter it using the command "ipkg list | grep <package name>" where <package name> is the text you want to search for. Alternatively, you view one page at a time using the "more" pipe, e.g. "ipkg list | more"
- Note: ipkg expects to find your ipkg files/programs in the path "/opt". As the synology NAS's put all your files in "/volume1" the bootstraps put your IPKG files/programs in "/volume1/@optware" but then mount this directory so it ALSO appears as "/opt". Hence, do not think that "/volume1/@optware" and "/opt" are duplicated files, they are not duplicated, they are in fact exactly the same directory.
- ===============
- 02 INSTALL BASH
- ===============
- 1) Install the bash, coreutils, and man packages with:
- ipkg install bash
- ipkg install coreutils
- ipkg install man
- 2) Add the symbolic link to bash in /bin with:
- ln -s /opt/bin/bash /bin/bash
- 3) Modify root's profile at ~/.profile to launch bash on log in by adding the following lines:
- if [[ -x /bin/bash ]]; then
- echo Starting bash...
- exec /bin/bash
- fi
- 4) Log in as root in a new window to confirm the changes work before closing your working window.
- root@DiskStation:~ # echo $0
- /bin/bash
- DragonSlay Installation
- ==============================================
- ===============
- 03 INSTALL JIRA
- ===============
- 1) Add a new jira user and group in /etc/passwd, /etc/group, /etc/shadow:
- root@DiskStation:~ # vi /etc/passwd
- jira:x:147:147:JIRA:/opt/atlassian/jira:/bin/sh
- root@DiskStation:~ # vi /etc/shadow
- jira:*:10933:0:99999:7:::
- root@DiskStation:~ # vi /etc/group
- jira:x:147:jira
- root@DiskStation:~ # mkdir /opt/atlassian/jira
- root@DiskStation:~ # mkdir /opt/atlassian/application-data
- root@DiskStation:~ # mkdir /opt/atlassian/application-data/jira
- root@DiskStation:~ # chown jira:jira /opt/atlassian/jira
- root@DiskStation:~ # chown jira:jira /opt/atlassian/application-data/jira
- 2) Create the JIRA database and database user in PostgreSQL:
- root@DiskStation:~ # su - postgres
- BusyBox v1.16.1 (2015-01-07 15:00:31 CST) built-in shell (ash)
- Enter 'help' for a list of built-in commands.
- DiskStation> /usr/syno/pgsql/bin/createuser -P jiradbuser
- Enter password for new role:
- Enter it again:
- DiskStation> /usr/syno/pgsql/bin/createdb -E UTF8 -T template0 -O jiradbuser jira
- DiskStation> vi /etc/postgresql/pg_hba.conf
- # TYPE DATABASE USER ADDRESS METHOD
- local all all trust
- host all all 127.0.0.1/32 trust
- host all all ::1/128 trust
- host jira all 16.1.1.1/24 trust
- DiskStation> /usr/syno/pgsql/bin/pg_ctl reload
- server signaled
- DiskStation> exit
- Now connect via phpPgAdmin and log in as the jiradbuser account to confirm it's working.
- 3) JIRA Installation
- root@DiskStation:~ # su – jira
- DiskStation> cd /opt/atlassian/jira/
- Download the linux atlassian-jira-6.3.13-x32.bin to the /opt/atlassian/jira/ directory.
- DiskStation> chmod 700 atlassian-jira-6.3.13-x32.bin
- Try to execute it with:
- DiskStation> ./atlassian-jira-6.3.13-x32.bin
- It will ask: You do not have administrator rights to this machine. This means... Press Y
- Also, the network ports JIRA wants to use by default are already used, so I used 8180 and 8105 for the new ports.
- DiskStation> ./atlassian-jira-6.3.13-x32.bin
- Unpacking JRE ...
- Starting Installer ...
- Jan 16, 2015 4:42:49 PM java.util.prefs.FileSystemPreferences$2 run
- INFO: Created system preferences directory in java.home.
- You do not have administrator rights to this machine and as such, some installation options will not be available. Are you sure you want to continue?
- Yes [y, Enter], No [n]
- y
- This will install JIRA 6.3.13 on your computer.
- OK [o, Enter], Cancel [c]
- o
- Choose the appropriate installation or upgrade option.
- Please choose one of the following:
- Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing JIRA installation [3]
- 2
- Where should JIRA 6.3.13 be installed?
- [/opt/atlassian/jira/atlassian/jira]
- /opt/atlassian/jira
- Default location for JIRA data
- [/opt/atlassian/jira/atlassian/application-data/jira]
- /opt/atlassian/application-data/jira
- Configure which ports JIRA will use.
- JIRA requires two TCP ports that are not being used by any other
- applications on this machine. The HTTP port is where you will access JIRA
- through your browser. The Control port is used to Startup and Shutdown JIRA.
- Use default ports (HTTP: 8080, Control: 8005) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
- 2
- HTTP Port Number
- [8080]
- 8180
- Control Port Number
- [8005]
- 8105
- Extracting files ...
- Please wait a few moments while JIRA starts up.
- Launching JIRA ...
- Installation of JIRA 6.3.13 is complete
- Your installation of JIRA 6.3.13 is now ready and can be accessed via your
- browser.
- JIRA 6.3.13 can be accessed at http://localhost:8180
- Finishing installation ...
- Point Firefox at http://16.1.1.3:8180
- 4) Set up JIRA Startup and Shutdown scripts
- ?? /opt/etc/init.d/
- DiskStation> vi /opt/atlassian/jira/bin/user.sh
- # START INSTALLER MAGIC ! DO NOT EDIT !
- JIRA_USER="jira" ##
- # END INSTALLER MAGIC ! DO NOT EDIT !
- export JIRA_USER
- root@DiskStation:~ # vi /usr/local/etc/rc.d/S95jira.sh
- #!/opt/bin/bash
- # Adjust bash path for Synology
- # JIRA Linux Server Control Script
- cd "/opt/atlassian/jira/bin"
- case "$1" in
- Start)
- ./start-jira.sh
- ;;
- stop)
- ./stop-jira.sh
- ;;
- *)
- echo "Usage: $0 {start|stop}"
- exit 1
- ;;
- esac
- root@DiskStation:~ # chmod +x /usr/local/etc/rc.d/S95jira.sh
- root@DiskStation:~ # vi /opt/atlassian/jira/bin/start-jira.sh
- #!/opt/bin/bash
- # Adjust bash path for Synology
- # resolve links - $0 may be a softlink - stolen from catalina.sh
- PRG="$0"
- while [ -h "$PRG" ]; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`/"$link"
- fi
- done
- PRGDIR=`dirname "$PRG"`
- PRGRUNMODE=false
- if [ "$1" = "-fg" ] || [ "$1" = "run" ] ; then
- shift
- PRGRUNMODE=true
- else
- echo ""
- echo "To run JIRA in the foreground, start the server with start-jira.sh -fg"
- fi
- . `dirname $0`/user.sh #read in the user name
- if [ -z "$JIRA_USER" ] || [ $(id -un) == "$JIRA_USER" ]; then
- echo executing as current user
- if [ "$PRGRUNMODE" == "true" ] ; then
- exec $PRGDIR/catalina.sh run $@
- else
- exec $PRGDIR/startup.sh $@
- fi
- elif [ $UID -ne 0 ]; then
- echo JIRA has been installed to run as $JIRA_USER so please sudo run this to enable switching to that user
- exit 1
- else
- echo executing using dedicated user: $JIRA_USER
- if [ -x "/sbin/runuser" ]; then
- sucmd="/sbin/runuser"
- else
- sucmd="/opt/bin/su" # Adjust path for Synology
- fi
- if [ "$PRGRUNMODE" == "true" ] ; then
- $sucmd -m $JIRA_USER -c "$PRGDIR/catalina.sh run $@"
- else
- $sucmd -m $JIRA_USER -c "$PRGDIR/startup.sh $@"
- fi
- fi
- root@DiskStation:~ # vi /opt/atlassian/jira/bin/stop-jira.sh
- #!/opt/bin/bash
- # Adjust bash path for Synology
- # resolve links - $0 may be a softlink - stolen from catalina.sh
- PRG="$0"
- while [ -h "$PRG" ]; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`/"$link"
- fi
- done
- PRGDIR=`dirname "$PRG"`
- . `dirname $0`/user.sh #readin the username
- if [ -z "$JIRA_USER" ] || [ $(id -un) == "$JIRA_USER" ]; then
- echo executing as current user
- exec $PRGDIR/shutdown.sh 20 -force $@
- elif [ $UID -ne 0 ]; then
- echo JIRA has been installed to run as $JIRA_USER so please sudo run this to enable switching to that user
- exit 1
- else
- echo executing using dedicated user
- if [ -x "/sbin/runuser" ]; then
- sucmd="/sbin/runuser"
- else
- sucmd="/opt/bin/su" # Adjust path for Synology
- fi
- $sucmd -m $JIRA_USER -c "$PRGDIR/shutdown.sh 20 -force $@"
- fi
- ===============
- 04 INSTALL CONFLUENCE
- ===============
- 1) Add a new confluence user and group in /etc/passwd, /etc/group, /etc/shadow:
- root@DiskStation:~ # vi /etc/passwd
- confluence:x:148:148:CONFLUENCE:/opt/atlassian/confluence:/bin/sh
- root@DiskStation:~ # vi /etc/shadow
- confluence:*:10933:0:99999:7:::
- root@DiskStation:~ # vi /etc/group
- confluence:x:148:confluence
- root@DiskStation:~ # mkdir /opt/atlassian/confluence
- root@DiskStation:~ # mkdir /opt/atlassian/application-data/confluence
- root@DiskStation:~ # chown confluence:confluence /opt/atlassian/confluence
- root@DiskStation:~ # chown confluence:confluence /opt/atlassian/application-data/confluence
- 2) Create the Confluence database and database user in PostgreSQL:
- root@DiskStation:~ # su - postgres
- BusyBox v1.16.1 (2015-01-07 15:00:31 CST) built-in shell (ash)
- Enter 'help' for a list of built-in commands.
- DiskStation> /usr/syno/pgsql/bin/createuser -P confdbuser
- Enter password for new role:
- Enter it again:
- DiskStation> /usr/syno/pgsql/bin/createdb -E UTF8 -T template0 -O confdbuser confluence
- DiskStation> vi /etc/postgresql/pg_hba.conf
- # TYPE DATABASE USER ADDRESS METHOD
- local all all trust
- host all all 127.0.0.1/32 trust
- host all all ::1/128 trust
- host jira all 16.1.1.1/24 trust
- host confluence all 16.1.1.1/24 trust
- DiskStation> /usr/syno/pgsql/bin/pg_ctl reload
- server signaled
- DiskStation> exit
- 3) Confluence Installation
- root@DiskStation:/opt/atlassian/confluence # su - confluence
- BusyBox v1.16.1 (2015-01-07 15:00:31 CST) built-in shell (ash)
- Enter 'help' for a list of built-in commands.
- DiskStation> ls
- atlassian-confluence-5.6.5-x32.bin
- DiskStation> ./atlassian-confluence-5.6.5-x32.bin
- Unpacking JRE ...
- Starting Installer ...
- Jan 18, 2015 2:16:52 PM java.util.prefs.FileSystemPreferences$1 run
- INFO: Created user preferences directory.
- Jan 18, 2015 2:16:52 PM java.util.prefs.FileSystemPreferences$2 run
- INFO: Created system preferences directory in java.home.
- You do not have administrator rights to this machine and as such, some installation options will not be available. Are you sure you want to continue?
- Yes [y, Enter], No [n]
- y
- This will install Confluence 5.6.5 on your computer.
- OK [o, Enter], Cancel [c]
- Choose the appropriate installation or upgrade option.
- Please choose one of the following:
- Express Install (uses default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing Confluence installation [3]
- 2
- Where should Confluence 5.6.5 be installed?
- [/opt/atlassian/confluence/atlassian/confluence]
- /opt/atlassian/confluence
- Default location for Confluence data
- [/opt/atlassian/confluence/atlassian/application-data/confluence]
- /opt/atlassian/application-data/confluence
- Configure which ports Confluence will use.
- Confluence requires two TCP ports that are not being used by any other
- applications on this machine. The HTTP port is where you will access
- Confluence through your browser. The Control port is used to Startup and
- Shutdown Confluence.
- Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
- 2
- HTTP Port Number
- [8090]
- 8190
- Control Port Number
- [8000]
- 8100
- Extracting files ...
- Please wait a few moments while Confluence starts up.
- Launching Confluence ...
- Installation of Confluence 5.6.5 is complete
- Your installation of Confluence 5.6.5 is now ready and can be accessed via
- your browser.
- Confluence 5.6.5 can be accessed at http://localhost:8190
- Finishing installation ...
- Stop Confluence...
- DiskStation> bin/stop-confluence.sh
- DiskStation> vi bin/user.sh
- # START INSTALLER MAGIC ! DO NOT EDIT !
- CONF_USER="confluence" ##
- # END INSTALLER MAGIC ! DO NOT EDIT !
- export CONF_USER
- Point Firefox at http://16.1.1.3:8190/confluence
- 4) Set up Confluence Startup and Shutdown scripts
- #!/opt/bin/bash
- # Adjust bash path for Synology
- # Confluence Linux Server Control Script
- # Set private environment
- JAVA_HOME=”/opt/java”
- PATH=$PATH:/opt/java/bin
- export JAVA_HOME PATH
- cd "/opt/atlassian/confluence/bin"
- case "$1" in
- Start)
- /opt/bin/su -m confluence -c./startup.sh
- ;;
- stop)
- /opt/bin/su -m confluence -c./shutdown.sh
- ;;
- *)
- echo "Usage: $0 {start|stop}"
- exit 1
- ;;
- esac
- ===============
- A1 DragonSlay Installation Research Notes
- ===============
- References:
- A partial write up of an early Atlassian DragonSlay on a Synology DS1511+
- https://webselblog.wordpress.com/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement