Setting up your Development Environment
This tutorial will walk you through setting up the following foundational technologies we use in Professional Services:
- Python
- Poetry
- Node
- NPM
- Ruby
Instead of installing each of these tools directly through a package manager or by compiling from source, we will be leveraging version managers as much as possible.
Installing Python with Pyenv
Pyenv is a python version manager which allows a user to manage multiple python versions on a single machine through a simple CLI
- Follow the installation instructions on Pyenv’s GitHub
- Once Pyenv is installed, run
pyenv install 3.8
. This will install Python 3.8 as well as Pip for installing additional python packages - Confirm Python and pip are installed by running
python3 --version
pip3 --version
Note: Refer to Pyenv’s common build problems wiki article if you are experiencing any issues installing Python through Pyenv, and then reach out to #ps-practice on slack if you have additional questions
Installing Poetry
Poetry is our default dependency manager for our Python applications. Poetry bundles up a few useful tasks into one single tool:
- Python virtual environments
- Package dependencies
- Building and publishing to PyPi
- Custom scripts or exectuables that will be installed when installing the package
- Install Poetry using their official installer or through pip by running
pip install poetry
- Confirm poetry is install by running
poetry --version
# OR
python3 -m poetry --version
Installing Node and NPM with NVM
NVM is a version manager for Node and NPM, and like Pyenv helps to keep versions up to date through the use of a single CLI.
- Follow the installation instructions on NVM’s GitHub
- Check to make sure NVM is part of your $PATH. This can be found in a file like
~/.bashrc
,~/.bash_profile
, but depending on your shell of choice the file may have a difference name. - Run
nvm install node
to install the latest version of Node and NPM. You can specify the Node version by running a command likenvm install 14.7.0
. Additional usage can be found in the Usage section of the NVM README - Confirm Node and NPM are installed by running:
node --version
npm --version
Installing Ruby with RVM
While we do not do a lot of Ruby development in Professional Services, it is important to have Ruby installed in the event we need to do some work directly on the GitLab codebase itself.
This section is only going to cover installing RVM to manage your Ruby installation. If you want to work on the GitLab codebase, refer to the GDK project and its installation instructions.
- Follow the installation instructions on the RVM website
- Ensure RVM is in the $PATH
- Install the version of Ruby specified in the .ruby-version file in GitLab by running
rvm install <version-specified>
You may need to run /bin/bash --login
if RVM prompts you with an error saying RVM is not a function
Optional Next Steps
Service Delivery Workshops
- Migration Workshop - Learn how to use Congregate to migrate data from one GitLab instance to another
- GET Deployment Workshop - Set up and use GET to spin up a highly available GitLab instance in AWS
Application Specific Development Environments
46417d02
)