This is repository contains scripts that help maintain Docker instances of team tools created by JetBrains. These tools are Hub, TeamCity, Upsource, and YouTrack.
At the moment, there is only one Python script and one shell script. The shell script will soon be converted to Python.
Tool | Supported | Product page | Docker image |
---|---|---|---|
Hub | ✔️ | ||
TeamCity | ✔️ | ||
Upsource | ✔️ | ||
YouTrack | ✔️ | ||
Datalore | ❌ | N/A | |
Space | ❌ | N/A |
Below is an explanation of what each script does and how to use them.
This script will shut down, remove, and recreate all of your teamware containers according to the specifications you outlined in your config file (see the Usage section below).
There are a few use cases for this script. I primarily use it to update the image that my containers run. You may also be able to revive a bugged-out container if something went haywire (although the issue may persist if it is caused by any configuration as the most configuration is persisted outside the container).
Create a copy of config_example.ini and name it config.ini
. You should keep this copy in the same directory as the example config. If you are not using one or more of the JetBrains products, you can simply remove them from the product_names
list and comment the lines involving that product in config.ini
.
Most of the config has been completed for you. However, there are a few things you must do before running the script. This may look intimidating but this only needs to be done once and then it's smooth sailing.
- For whatever directories you have set for
data_dir
,conf_dir
,logs_dir
, andbackups_dir
, be absolutely sure that you have followed the instructions for that specific product. For example, Hub needs its folders to be created with file mode750
as well as be owned by user13001
and group13001
.- You can find the instructions for creating the folders and setting permissions on the Docker image's page on DockerHub. Links are available in the table above. DO NOT APPLY THE INSTRUCTIONS FOR ONE PRODUCT TO ANOTHER there are differences between some of the images and you will run into issues if you ignore them.
- You may use the directories they are currently set to. These are already reasonable names and you don't have to change them. Just be sure these directories actually exist and the permissions have been set correctly. Note that TeamCity only has a
data_dir
and alogs_dir
because it just has to be different... 😕
- This script expects you to have added yourself to the
.ssh/authorized_keys
on the remote server- To do this, you must run
ssh-copy-id [username@hostname]
on your computer wherehostname
is either the hostname or IP address of the server you intend to run these containers on andusername
is a super user on that server. - If you get the message
/usr/bin/ssh-copy-id: ERROR: No identities found
, you must first runssh-keygen
which will guide you through creating a public and private SSH key. Then, try again.
- To do this, you must run
key_filename
must be set to the full path ofid_rsa.pub
.- The default location for this is
/home/your_username/.ssh/id_rsa.pub
on *nix andC:\Users\your user name\.ssh\id_rsa.pub
on Windows. You're usually told the location if you've just runssh-keygen
with a message likeYour public key has been saved in /home/ryan/.ssh/id_rsa.pub
.
- The default location for this is
username
andhostname
inconfig.ini
must be set to the same values that you used when you ranssh-copy-id
.
Breathe out. You're done with the initial steps. Most of the config.ini
options are peppered with comments explaining what they are for. You should be set from here.
Go ahead and run the script. It will ask for your password and then it will tear down and rebuild all of your containers.
Description coming soon. This will also be changed to Python soon.