Get the Most out of the GitLab Template in Skytap Cloud
Last week we delivered to you a GitLab Public Template built on our new Ubuntu 18.104.22.168 template. GitLab is a self-hosted Git management server (think GitHub, but hosted by you). It is a fast, secure, and stable solution with a management UI built on Ruby on Rails and Git functionality is provided by Gitolite. You can find additional information on the GitLab website, and the code can be found on GitHub.
Now that you have the template, some may be asking what can actually be done with it. Simply put, you now have enterprise-level Git hosting at your fingertips. So let’s grab the keys and take this new template out for a spin.
To start, you need to get GitLab up and running. This should be fairly painless. Follow these 5 steps:
- Log in to Skytap
- Click the Templates tab
- Search for GitLab
- Highlight the template and click New Configuration
- Click Run
Next, add a client machine so you can do administration while using GitLab. Follow these 5 steps:
- Click Add VMs
- Search for Ubuntu
- Select the Ubuntu 12.04 LTS Desktop Linux template
- Click Add
- Click Run
Once the new client VM spins up, connect to it via SmartClient and log in (use the Skytap account in the credentials section of SmartClient. Once inside the client VM, start Firefox (Applications > Internet > Firefox Web Browser) and we’ll configure GitLab.
In the browser address bar, type: http://host-1 (Note: If that doesn’t work, double-check the Network name associated with the GitLab VM on the Skytap configuration page.)
- Log in as:
- User – firstname.lastname@example.org
- Pass – 5iveL!fe
- User – skytap
- Email – email@example.com
- Password – skytap
Now that you have a regular user in GitLab, you can set that user up to connect to GitLab via Git. This will require installing a few software packages on our client and also creating an ssh key to give to GitLab.
- Log in to GitLab using your new user account
- User – firstname.lastname@example.org
- Password – skytap
- Open the terminal (Applications > Accessories >Terminal)
- Type the following (Hit enter to accept the defaults while the key is being built):
- Copy the entire output of the cat command (should start with ssh-rsa and end with email@example.com)
Now you are set up on the client and ready to create your first project in GitLab. You can go back to your web browser and click the GitLab image on the upper left-hand side of the page. This will put you back on the main dashboard page.
Next, complete the following:
- Click Create New Project in Firefox
- Use whatever project name you prefer
- I’m going to use express_sample and will assume you have as well
Now GitLab has done you a huge favor. It tells you how to create your Git library from within terminal, so give it a try. Open up terminal again and execute the following commands to initialize your remote Git repository on GitLab:
That does it. You should now have your new project checked in to the GitLab remote repository hosted in Skytap. You can click the Home button in GitLab and poke around inside of your new project, view files, etc.
To make things easier, we’ve put the client into the same Skytap configuration as GitLab. You could, however, use the ICNR functionality to have GitLab in one configuration and your client in another. You could also use the Skytap VPN functionality to make GitLab in Skytap available to local development clients.
As always, if you have any questions, don’t hesitate to get in touch with Skytap Support or your Skytap representative. Also, you may want to keep this configuration around for awhile as my next blog post will be building on this one.
Until next time,