I'm back from my break and ready to install and configure some software. I'll start with Jenkins first as it's probably the easiest, and doesn't require a lot of configuration. The actual install is just adding their binary repository to the trusted repository in Ubuntu, and running the normal installer. It's four lines of code:
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo vi /etc/apt/sources.list ## add to the end: deb http://pkg.jenkins-ci.org/debian binary/
sudo apt-get update
sudo apt-get install jenkins
You'll see a bunch of scrolling after the last two lines. Once it's done, Jenkins is installed as a service. You can go to the site to make sure it's running: http://yourserver:8080/ If you had Tomcat or something else running on 8080, I'm not sure what the installer would do, I'll leave that as an exercise for the student. You don't have to worry about securing it, unless you plan on exposing port 8080, reverse proxying it from Apache httpd, or you don't trust your cats, since it can only be seen on the internal network. I doubt I'll expose it to the world, as I don't care to check if my builds are failing while I'm out having coffee somewhere. Application #1 installed.
Next I'm going to install Nexus. Nexus runs without much installation. Here's the instructions from their site:
sudo cp nexus-2.8.0-05-bundle.tar.gz /usr/local
cd /usr/local
sudo tar xvzf nexus-2.8.0-05-bundle.tar.gz
ln -s nexus-2.8.0-05 nexus
If you noticed, the last line will probably fail, as they don't say simon says (sudo) This is assuming that you want it installed in /usr/local so that it can be run as a service. The /usr/local might be arbitrary, and you might be able to install it in /opt or some other directory, but I tend to follow the instructions to the T, as that's probably what they've tested with, and you never know where they may have hardcoded /usr/local into the code or some script. The next thing they tell you to do to run it as a service is:
./bin/nexus start
But that's going to fail. First they forgot to mention the whole 'cd nexus' thing that needs to happen. Then there's a little thing call user permission that will get in the way. There's a couple things you can do: run it as yourself, or create a 'nexus' user (perhaps without a shell account so no one can actually log on as nexus), and then chown -R the various directories to the user running nexus. I'm going to make it simple and run it as myself. I won't add it to the /etc/init.d directory so it won't start on boot, and I'll have to make sure I go back and restart it if the computer is rebooted for whatever reason. Not a big concern for me, but a real company whose developers depend on nexus may want to figure out a way to start it automatically on boot. Now you can try it out by browsing to http://servername:8081/nexus. Just in case you're wondering the admin username/password is admin/admin123. That's something you might want to change, as you may want to reverse proxy it to expose your repository so you can code away from home. You might be able to get away with only reverse proxying the pertinent subdirectories, but I would still change the admin password, you never know how a clever hacker might be able to get into the system once you've exposed a part of it. Nexus runs pretty well out of the box without a lot of configuration, but you may want to add additional repositories like java.net or jboss or your favorite Maven repositories. Since the './bin/nexus start' command runs it as a daemon, you don't have to worry about logging off your server, it will still run in the background. Application #2 installed.
Next is Jira. This has a fairly easy installation, set the jira-*.bin file to executable and run it:
randalkamradt@Codemonkey:~$ chmod +x *.bin
randalkamradt@Codemonkey:~$ sudo ./atlassian-jira-6.2.3-x64.bin
By doing the chmod on *.bin, I can change both Jira and Confluence. Just make sure you don't have any other *.bin files laying around your user directory, they'll get the execute flag set as well, which could lead to some hilarious consequences. Don't worry about running the install as root, that's just so it can install itself as a service like a good application. After a bunch of scrolling you get some prompts, you can take the default on most of them, except one. The default is a custom install, which you want because the default port is 8080, and that would cause a bloody battle between Jira and Jenkins, and I wouldn't want to watch such a spectacle. It requires two ports, an HTTP port and a control port. I set the HTTP port to 8082 and the control port to 8007 (remember 8081 is taken by nexus). Once it's finish you can browse to http://servername:8082, BUT only if you have a few minutes to set it up. On first start up it will run you through the configuration process. You will need to make sure your mail and postgres servers are running. If you did the installation like I went through in the last post, mail should already be running, and you can check it with 'telnet localhost 25' which will connect your terminal to port 25 where the SMTP server is running. If you get a response that starts with 220, you're probably good. Now you need to setup postgres with at least a postgres user and a database. Here's the instruction from Atlassian:
user:~$ sudo su - postgres
postgres:~$ createuser -P jira
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
CREATE ROLE
postgres:~$ logout
user:~$ sudo su - jira
jira:~$ createdb jiradb
CREATE DATABASE
Opps, a few more little mistakes. The createuser postgres command need to take the --interactive flag to give all the prompts listed. Also, the Jira install created the jira system user (not to be confused with the jira database user we just created), and set its home directory to /home/jira, but didn't create that directory. To keep the system from complaining, I created the directory and set the owner to the jira system user. Otherwise this worked ok. Now we can browser to http://servername/8082 and begin the configuration process.
The first thing it ask is your language. I set mine to pirate (just kidding, they haven't translated it to pirate yet). Then you need to supply the information about the database. You just set up the Postgres database so I suggest you use that one with localhost as the server:5432 (my favorite random port), database is jiradb, user is jira, schema is public, password is whatever you used when you set up the user. There's a handy test connection button, press it and it will tell you everything's ok. If it's not, I suggest you keep your day job as long as your day job isn't setting up databases.
Next it will ask you for the 'title', I suggest Bug Zoo, or Insect Faire. It will ask you if it's public or private mode, that is can anyone add users or only the admin. If you plan on exposing this to the Internet, I would suggest private mode, or spammers will somehow find a way to send spam through your system. Even in private mode, the admin person can 'invite' a user, where the user will get an email and be able to click a link to sign up. Finally you'll be asked for a base URL. This maybe important if you're planning on reverse proxying, but unless you have your reverse proxy setup, you should leave this as the internal URL and hope you can configure it later to the external URL. On the next screen you will be asked for a license. I you already have a license, you can enter it, otherwise you can check one of the boxes and it will walk you through getting an eval license. The next screen you will set up an admin user, fill it in with the usual stuff. One thing to keep in mind, if you create two accounts for yourself, one for administration and one for general use, you'll need separate email addresses. The next screen will prompt if you want to set up your email system. Might as well do it now, if you've already tested your SMTP server it should be easy. You select a name which is just an arbitrary name (I choose monkeymail) the from email, which they pull from the admin email, a prefix which they add to all emails from the Jira system so you can filter them to the trash folder, A server type, you probably want SMTP and provider, you probably want custom, although you might just hook it straight up to a gmail or Yahoo mail server. I chose custom, since I went through the trouble of setting up an SMTP server for situations like this. The hostname is localhost, and the rest of the parameters should be default. Once again, there's a test button which you should click to make sure everything's hunky-dorey. Getting past this page should take you too the System Dashboard. There are a lot of other things to get setup, but I'll leave that to you. The only thing I would advise is to go to User Management and use the email invitation to invite as many users as you know will be using the system, as when you install Confluence next, it can import all the Jira users.
I'll take another break here and next I will install Confluence, work on some of the reverse proxies, and do some more configuration of the various components.
The fun stuff is yet to come.
No comments:
Post a Comment