Log in to Rahti from the CLI
- Summary
- This tutorial shows you how to log in to Rahti from the CLI.
- Internet
- https://rahti.csc.fi
flowchart LR
A(Log in to<br>rahti.csc.fi) --> B(Select<br>'copy login command'<br>under username)
B --> C(Log in to Rahti service again)
C --> D(Click 'Display token' link and copy oc command)
D --> E(Open the terminal)
E --> F(Paste and execute the <code>oc</code> command)
Prerequisites
- CLI tools are installed.
- Successful login to the Rahti service over the web.
Procedure
Log in to Rahti service's web page. Select 'Copy login command' from the menu under the username.
Click on the 'Login' button.
Authenticate with your CSC account or Haka login.
Once you have successfully logged in, click the Display Token link.
If you want to use the oc
command, copy the first command from the web page.
Then open the terminal and paste the command into the command line.
Info
Please note that the example token below is invalid and you must use the token from your own environment.
Terminal
$ oc login --token=sha256~HtQgn28ZQLDdk2tD3ZHs_mMaAFAuQTfHvKKfmmT9_3Z --server=https://api.2.rahti.csc.fi:6443
Logged into "https://api.2.rahti.csc.fi:6443" as "cbrown" using the token provided.
You have one project on this server: "basics-of-containers"
Using project "basics-of-containers".
$ _
That's it!
Now you have an access to your Rahti environment from the command line.
You can test the access by typing the command oc whoami
and the command should respond with your active username.
Further Learning
Here are some suggestions for what to read next: