Hyppää sisältöön

Instance on CSC cPouta service

Based on Kubernetes documentation: Version 1.13 by Mysticons 2021: Sini Karvonen, Timo Lehosvuo, Heikki Pekkarinen, Matti Saarelma, Samuli Ylönen

https://gitlab.labranet.jamk.fi/wimmalab2021/mysticons/guides/-/blob/master/Kubernetes_1.0.pdf

Contents

[[TOC]]

1 Introduction

This document introduces the steps on how build instance to CSC cPouta service.

These steps and working habits have formed in the summer of 2021 at WIMMA Lab.

2 Requirements

This project works as cloud-based platform. Modern computer with internet connection can be used to manage project.

Equipment / Software / Account / Project Need
Computer For Internet and SSH connection, Win, Linux, OSX
HAKA credentials to access CSC services
SSH software ( Putty, Kitty, Terminus, etc.) for SSH connection
PUTTY keygen for SSH key creation, alternatively you may create keys via cmd promt
CSC cPouta Project to run Virtual machines

Requirements from user: good basic knowledge of operating systems, data network and remote connections is also needed.

3 About CSC and cPouta

CSC is a non-profit state enterprise with special tasks. As part of the national research system, we develop, integrate and provide high-quality information technology services and ensure that Finland remains at the forefront of development. Source: https://www.csc.fi/en/csc

CSC – IT Center for Science Ltd. Also known as Finnish IT center for science. It provides IT support and modeling, computing and information services for academia, research institutes and companies in Finland. Source: https://en.wikipedia.org/wiki/CSC_–_IT_Center_for_Science

CSC provides a server environment. CSC's server environment comprises several different supercomputers, database servers and information servers connected to each other by high-speed communication connections. In this documentation, we only focus on working with cPouta service under MyCSC project.

With cPouta, you can quickly deploy a self-managed infrastructure with a simple interface. cPouta is based on open source cloud software called OpenStack. You can use cPouta to build your own service, do a quick test, create a development platform, build a dataprocessing pipelines, or any other purpose you can think of.

You can access the cPouta web interface through a web browser and a set of APIs that allow you to programmatically manage resources. Source: https://www.csc.fi/en/csc

4 Getting stated

Here are the steps that you will need to go through to get a Virtual machine working on CSC cPouta service.

STEP 1: My CSC: new project and cPouta service

STEP 2: Ubuntu running on CSC-service. SSH-key for SSH connection.

STEP 3: SSH connection to VM.

5 Step 1

At this first step we define the Instance which works over Cloud based server

5.1 CSC

This is quide to cloud environment provided by CSC.

Login to the website https://my.csc.fi/ with your HAKA credentials.

Fill your own details for CSC.

Under "My Projects" you need to create a new project.

After creating, we need to apply resources for it, -> scroll down and you find "Apply for resources"

Add description and keywords, check your field of science and sub science areas.

After approved resource application you need to add service for it. Pick cPouta from list on right and tick "I have read and accepted the cPouta Terms and Conditions". -> Add service

You also need to fill more your details in "My Profile" to get access to your projects in CSC if you didn't give them right in the beginning.

Way to go, now you have a project in CSC.

6 Step 2

At this second step we create Ubuntu virtual machine that works over cPouta and we determine SSH-key for remote connection.

6.1 cPouta

To access to your cPouta project login to the site https://pouta.csc.fi.

Again, use your HAKA credentials.

If your new project does immediately appear in cPouta, just wait for a while its creation takes time. When it's ready, your new project can be found at the top in the dropdown menu.

In this overview view you can see your resources for this project.

6.2 Set up SSH keys

Helpful step at this point is to create key pairs for your upcoming virtual machine. Go to the Key pairs section. Please do not use tool Create key pair what pouta.csc offers ( In our cases It does not seem work properly )

We recommend you use PuTTYGen for generating the key pair

https://www.puttygen.com/download.php?val=49

( Other option is create keys in command prompt like shown in chapter: For OSX users below ).

In PuTTY Key generator go in Key -> Parameters for saving key files

Change PPK file version from 3 to 2.

Generate a public/private key pair:

  • Copy Public key into your clipboard

  • (You may add a passphrase if you want)

  • And save the private key for upcoming SSH connections

Next push import public key in CSC key pairs section.

Paste public key from your clipboard to public key zone and give recognizable name for your key pair.

6.3 VM

To create VM in your cPouta project go in Compute/Images.

We prefer to use Ubuntu 20.04 -> Launch.

Kuva, joka sisältää kohteen pöytä Kuvaus luotu
automaattisesti

In next sections you need to:

  1. Give a name for your instance.

  1. Select the flavor. It depends on what your upcoming system needs are.

(You may add 2 instances with equal power over cPouta with standard.large flavor)

  1. Check key pair section that the key that you created is righty allocated.

  1. Next launch instance.

Created instance can be found from Compute/Instances.

Next give floating IP address for this new instance.

Because there is no floating IP address to pick, we need to create one by clicking the plus sing.

Press allocate IP.

Then select allocated for Instance and associate.

Now you see that your Instance has Floating IP.

6.4 Firewall rules for projection

To access via SSH to your Instance you need to setup Security group rule in your cPouta.

Go to the: Security Groups and there manage rules.

There you may find all default rules. Add new rule.

From the bottom of the list, you should find an SSH rule. Choose it and click add.

Now there is new Ingress (inbound) rule for port 22 and your Instance is ready for SSH connection. Remember this place when you have give or limit accesses.

7 Step 3

At this third step we take SSH connection to our VM.

7.1 SSH connection with PuTTY

For SSH connection we prefer to use PuTTY.

From PuTTY choose SSH/Auth and choose the key that you created earlier

  1. Go back to session section and give an IP address (Floating IP from Cpouta Instance)

  2. Give the session a name for upcoming connections

  3. Save these setting for that session

  4. Open connection

To login use admin: ubuntu

{

8 TIPS for OSX users:

  • Terminus software works smoothly and it's easy to use for SSH connection

  • To create SSH keys on OSX you may use command what Cpouta gives you :

Cmd on OSX

(Noteworthy compared to PUTTY it gives you keys in EdDSA format )

In Terminus, edit your created host and add key file there