This guide is tailored towards RHEL, but should work on other distros as well.
You might need to
The directions here are given for a bash shell. If you are using a Red Hat laptop the default shell should be bash. If it is not and you want to change it to bash you can do the following step.
- Launch the Terminal app
- Change default shell to bash
% chsh -s /bin/bash
- You’ll be prompt to enter your password. Then, close the terminal and reopen it. The terminal will come back with bash prompt "$".
- Launch the Terminal app
- Run the command to install the group Development Tools:
$ sudo dnf groupinstall 'Development Tools'
- Run this command:
$ gcc --version
- Verify you see the following:
gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1)
- Follow the directions here which are also summarized below.
sudo yum install -y yum-utils sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo sudo yum install docker-ce docker-ce-cli containerd.io sudo groupadd docker sudo usermod -aG docker $USER
- Start the docker daemon and make it so that it start automatically at boot.
sudo systemctl enable docker
- Restarting you computer may be needed in order for the next step to work.
- Run this command:
$ docker run --rm hello-world
- Verify you see output something like the following:
(...) Hello from Docker! (...)
-
Follow the directions here.
The steps are also given below:sudo yum -y install qemu-kvm libvirt libvirt-daemon-kvm sudo systemctl enable libvirtd sudo systemctl start libvirtd # Optionally check that your laptop supports VT technology. virt-host-validate # Check that firewalld is running systemctl status firewalld
-
Create a file at
/etc/yum.repos.d
with the following contents[kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-$basearch enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
-
Install and set up kubectl and additional tooling
sudo yum -y install kubectl wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 -O minikube wget https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 chmod 755 minikube docker-machine-driver-kvm2 sudo mv minikube docker-machine-driver-kvm2 /usr/local/bin/
- Please see here for the latest version used at StackRox that you should download.
Follow the directions here to install Go.
- Run the command to inspect the version of Go that was just installed. It should be what you expect:
$ go version go version go1.16.5 linux/amd64 # This should reflect the version you just installed
- Instructions for installing RocksDB dependencies can be found here. The steps for RHEL can be found below:
sudo yum install snappy-devel # If this fails, you may need to install snappy manually, using the following commands wget http://mirror.centos.org/centos/8/PowerTools/x86_64/os/Packages/snappy-devel-1.1.8-3.el8.x86_64.rpm sudo yum install cmake-filesystem sudo rpm -Uvh snappy-devel-1.1.8-3.el8.x86_64.rpm
- Download & install rocksdb v6.15.4: GitHub Release Page
wget https://github.com/facebook/rocksdb/archive/refs/tags/v6.15.4.tar.gz tar -xvf v6.15.4.tar.gz cd rocksdb-6.15.4/ make shared_lib static_lib sudo make install-shared install-static CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib/librocksdb.a" go get github.com/tecbot/gorocksdb
- Install npm
sudo yum install npm sudo npm install --global yarn
- Install nvm
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash source ~/.bashrc
- Update node
nvm install 12.13.0
```
node --version
v12.13.0 # This should match the version you installed with nvm
```
This is a helpful resource
```
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/b/bats-0.4.0-1.20141016git3b33a5a.el7.noarch.rpm
sudo rpm -Uvh bats-0.4.0-1.20141016git3b33a5a.el7.noarch.rpm
```
- Install gradle 6.7.1. Get it from here. Use the binary version.
- Add the following to your .bashrc file
export PATH=$PATH:<PATH_TO_GRADLE>/gradle-6.7.1/bin source ~/.bashrc
- Follow the directions here which are summarized below.
- Download the correct version of helm here
$ tar -zxvf helm-v3.6.2-linux-amd64.tar.gz $ cd linux-amd64/ #Or wherever your helm binary is $ sudo cp helm /usr/local/bin/
- Run the command to inspect the version of Helm that was just installed
$ helm version version.BuildInfo{Version:"v3.6.2", (...)}
- Clone the workflow repository:
# If you choose to follow the opinionated golang installation of putting everything into a "go" folder: $ mkdir -p ~/go/src/github.com/stackrox/ $ cd ~/go/src/github.com/stackrox/ $ git clone git@github.com:stackrox/workflow.git
- Follow the steps in the repo's README
- Run roxhelp in the terminal to verify correct installation.
$ roxhelp
Usage:
/Users/ross/go/src/github.com/stackrox/workflow/bin/roxhelp <command_name> (to print help for command <command_name>)
/Users/ross/go/src/github.com/stackrox/workflow/bin/roxhelp --list-all (to list all available Rox commands)