Skip to content

Getting SPPMon source code

Niels Korschinsky edited this page Aug 26, 2021 · 4 revisions

Getting SPPMon source code

You may have access to the source code via a release file (see releases) or just by directly cloning from GitHub.

Both ways work equivalent, while cloning via GitHub allows an easier update in case new features and fixes are available. Cloning via GitHub is therefore recommended.

Cloning the source code from GitHub

You may get the SPPMon source code by cloning SPPMon via HTTPS or SSH. Https may be sufficient for execting SPPMon and receiving updates, while SSH is required for contributing.

It is required to have git installed. You may check this by executing git --version
If it is not installed, please do so by executing yum install git (CentOs).

HTTPS-Clone

You may download the code directly from GitHub. It is not required to set up a user or authenticate.

Note: If you want to update SPPMon you may do so by executing git pull inside the newly created folder spectrum-protect-sppmon in step 2 below.

  1. Move to the home directory or any desired destination:
    cd ~

  2. Clone SPPMon:
    git clone https://github.com/IBM/spectrum-protect-sppmon.git\

    Cloning into 'spectrum-protect-sppmon'...
    remote: Enumerating objects: 1591, done.
    remote: Counting objects: 100% (397/397), done.
    remote: Compressing objects: 100% (217/217), done.
    remote: Total 1591 (delta 282), reused 273 (delta 177), pack-reused 1194
    Receiving objects: 100% (1591/1591), 1.82 MiB | 610.00 KiB/s, done.
    Resolving deltas: 100% (1116/1116), done.
  3. You can check if your setup was successful: git status

    On branch master
    Your branch is up to date with 'origin/master'.
    
    nothing to commit, working tree clean

If there are no errors, your SPPMon setup is ready to go.
If you want to contribute to SPPMon by pushing code or create merge requests, please continue with the full setup below.

SSH-Clone with full setup

Create public/private keypair for Git access via ssh

Note: you may wish to use a user other than root with the following steps.

ssh-keygen -t rsa -b 4096 -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:

Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:mcdald34rmdi43m [email protected]
The key's random art image is:
+---[RSA 4096]----+
|... *.. S+       |
+----[SHA256]-----+

ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_git.pub

Authorize this system to access your GitHub account via the ssh key

  1. Navigate to Settings -> SSH and GPG keys
  2. Enter the content of id_git.pub to your GitHub account.

Setup the git connection

sudo mkdir /root/git
cd /root/git
git init
Initialized empty Git repository in /root/git/.git/
git config --global user.email "[email protected]"
git config --global user.name "Your Name"

git config core.sshCommand 'ssh -i /root/.ssh/id_rsa'
ssh -T [email protected]
Hi Your Name! You've successfully authenticated, but GitHub does not provide shell access.

Clone SPPMON

cd ~
git clone [email protected]:IBM/spectrum-protect-sppmon.git
Cloning into 'spectrum-protect-sppmon'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 596 (delta 2), reused 6 (delta 1), pack-reused 585
Receiving objects: 100% (596/596), 445.62 KiB | 0 bytes/s, done.
Resolving deltas: 100% (363/363), done.

Extract code from a release file

If you have a SPPMon release file, you might extract the code offline and skip cloning via git. You can find release files here.

  1. Navigate to the location (dir) of the release file
  2. Extract the code: tar -tzf spectrum-protect-sppmon-vX.X.X.tar.gz

Note: You need to replace the filename with the actual release package name

Next Steps

You may start the installation via one of the three install methods.

Clone this wiki locally