Introduction to using Cloud Computing Helmut Neukirchen University

  • Slides: 37
Download presentation
Introduction to using Cloud Computing Helmut Neukirchen University of Iceland helmut@hi. is Helmut Neukirchen

Introduction to using Cloud Computing Helmut Neukirchen University of Iceland helmut@hi. is Helmut Neukirchen

Your compute job does not fit your computer? • E. g. : You have

Your compute job does not fit your computer? • E. g. : You have only a laptop with max. 16 GB RAM, but you need more RAM! – (If you think you need faster CPU: maybe just wait a little bit longer for your compute job to complete…) Helmut Neukirchen 2

Your compute job does not fit your computer? Go to Jötunn student cluster at

Your compute job does not fit your computer? Go to Jötunn student cluster at University of Iceland (Máni will soon tell you more): – http: //ihpc. is/jotunn/ – 4 nodes, each: • CPU: 2 x Intel Xeon CPU E 5 -2690 v 3 (2. 6 GHz, 12 core) • RAM: 128 GB DDR 4 Helmut Neukirchen 3

Your compute job does not fit your computer? • Jötunn is still too small?

Your compute job does not fit your computer? • Jötunn is still too small? Go to Garpur ( http: //ihpc. is/garpur ): – 36 “normal” nodes, each: • CPU: 2 x Intel Xeon E 5 -2680 v 3 (2. 5 GHz, 12 core) • RAM: 128 GB (8 x 16 GB DDR 4 2133 MHz) – 8 “himem” nodes, each: • CPU: 2 x Intel Xeon E 5 -2698 v 3 (2. 3 GHz, 16 core) • RAM: 256 GB (16 x 16 GB DDR 4 2133 MHz) – 46 “omnip” nodes, each: • CPU: 2 x Intel Xeon Gold 6130 CPU (2. 10 GHz, 16 core) • RAM: 192 GB DDR 4 – 3 “gpu” nodes, each: • CPU: 2 x Intel Xeon E 5 -2648 L (1. 8 GHz, 8 core) • RAM: 64 GB (1 x) & 80 GB (2 x) • GPU: 2 x NVIDIA Tesla M 2090 Helmut Neukirchen 4

Your compute job does not fit your computer? • Resources in Iceland are still

Your compute job does not fit your computer? • Resources in Iceland are still too small? Ne. IC Dellingr: Get access to other Nordic HPC resources: – https: //dellingr. neic. no – Application form currently closed. : -( PRACE: Get access to European world-class HPC resources: – http: //www. prace-ri. eu – BIG and SCALABLE HPC software only! Helmut Neukirchen 5

Your compute job does not fit your computer? • Dellingr & PRACE approval of

Your compute job does not fit your computer? • Dellingr & PRACE approval of application takes some time – you need the resource now (paper deadline next week)! Cloud computing may be an alternative. • E. g. you need 3. 8 TB RAM: – Amazon: 1 “x 1 e. 32 xlarge” Elastic Compute Cloud node: • CPU: 4 x Intel Xeon E 7 8880 v 3 (2. 3 GHz, 18 core) 72 cores • RAM: 3904 GB DDR 4 • However, in contrast to all the previously mentioned (tax-payer funded resources), you have to pay for it: $32 / hour. – Is an option at least for shorter single node jobs. Helmut Neukirchen 6

What is Cloud computing? • Cloud computing is based on “elastic resources”: – A

What is Cloud computing? • Cloud computing is based on “elastic resources”: – A cloud provider offers resources: CPU cycles, RAM, disk storage, network bandwidth. – Instead of using your own hardware, you put your software and your data into “the cloud”. – If you need only few resources, you occupy (and pay) only few. – If you need more resources, more resources are available dynamically on-demand you pay for what you consume. Armbrust et al. : “A view of cloud computing”, Communications of the ACM, 53(4), pp. 50 -58, April 2010, DOI: 10. 1145/1721654. 1721672 Helmut Neukirchen 7

What is Cloud computing? A possible definition • Cloud computing: Provide computer resources on

What is Cloud computing? A possible definition • Cloud computing: Provide computer resources on The Internet is demand access them via a network. often visualised – Historic example: Amazon invested into hardware to handle Christmas shopping peak. as a cloud Cloud computing • Outside Christmas season, 90% of the hardware was idle. • 2006, Amazon started to sell idle CPU time. – While one application is idle, another application can use that CPU time ( economy of load multiplexing). • Nowadays, many different cloud providers have set-up cloud hardware all over the world. Helmut Neukirchen 8

Cloud computing service models (1/2) • Infrastructure as a Service (Iaa. S): – Provides

Cloud computing service models (1/2) • Infrastructure as a Service (Iaa. S): – Provides virtual machines (VM=CPU and RAM) and storage (=hard disk, SSD, tape). • Install own operating system and software and dependencies (e. g. database) on it. – Virtualisation: • You do not know on which hardware your virtual machine executes. • You do not know on which hardware your data is stored. – Elasticity: you can get as many resources as you need. • Virtual machines can/have to be started/terminated on demand. • Data can be stored/disposed as needed. Helmut Neukirchen 9

Cloud computing service models (2/2) • Platform as a service (Paa. S): – Provide

Cloud computing service models (2/2) • Platform as a service (Paa. S): – Provide virtual platform (APIs for typical services, e. g. database) to run Saa. S software. – Your own software will make use of these platform APIs (e. g. to access the database). – Elasticity: platforms scales automatically (replicate/load balance at high loads). • Software as a Service (Saa. S): – Access software remotely, typically via Web interface. No need to install software. • E. g. Microsoft Office 365 instead MS Office installation. – Elasticity: Pay per use (or subscription or free). Helmut Neukirchen 10

Cloud computing deployment models • Public cloud: Offer paid resources to others via the

Cloud computing deployment models • Public cloud: Offer paid resources to others via the Internet. • Private cloud: Use virtualisation in own datacenter. – E. g. to ease changing underlying hardware: • If server machine needs to be replaced or rebooted: just move seamlessly Virtual Machine image from one machine to another. – E. g. allows to give users superuser privilege. • Can install their own software within virtual machine sandbox. – Virtualisation: 10 -25% performance penalty. • Hybrid cloud: Scale from private into public cloud. – Seamlessly if private cloud uses same cloud management API interface as public cloud. Helmut Neukirchen 11

Example cloud provider: Amazon Elastic Compute Cloud EC 2 (Iaa. S) • EC 2

Example cloud provider: Amazon Elastic Compute Cloud EC 2 (Iaa. S) • EC 2 Virtual Machines: – Create a VM instance, incl. a root device (=VM image containing boot file system). – You provide the VM image (or use a pre-defined one): ISO format boot file system containing the operating system (e. g. Linux or Windows), libraries, your application. – You have to take care of all the Cloud aspects, e. g. load-balancing, replication, shutting-down a VM instance once it is not needed any more. • Amazon provides further services to be used together with EC 2, e. g. : – Elastic Block Store (EBS): stores raw blocks (like hard disk/SSD). • You can create, e. g. , a file system on it and attach it to your EC 2 instance. – Simple Storage Service (S 3): storage as object/file. • Easily accessible via Web. • Many competitors, e. g. Google Compute Engine, Microsoft Azure, … Helmut Neukirchen 12

Amazon EC 2 Pricing examples (without VAT) as of 6/2018 • EU Ireland data

Amazon EC 2 Pricing examples (without VAT) as of 6/2018 • EU Ireland data centre (US typically cheaper) EC 2 instances: – – t 2. nano: 1 virtual core, 0. 5 GB RAM, $0. 0063 / Hour m 5. 24 xlarge: 96 virtual cores, 384 GB RAM, $5. 136 / Hour x 1 e. 32 xlarge: 128 virtual cores, 3904 GB RAM, $32 / Hour GPUs available as well (but Open. GL only, no NVDIA CUDA). • Storage costs as well (there is no “idle” storage: cannot be multiplexed like CPUs more expensive) – EBS Cold HDD (sc 1): $0. 028 per GB-month – EBS Provisioned Input/output Operations Per Second (IOPS) SSD (io 1): $0. 138 per GB-month + $0. 072 per provisioned IOPS-month. • Internet traffic out from cloud to Internet: – First 1 GB / month $0. 00 per GB – Up to 10 TB / month $0. 09 per GB Helmut Neukirchen 13

 • Infrastructure as a Service: Working with instances VM instance – is protected

• Infrastructure as a Service: Working with instances VM instance – is protected by a firewall: needs to configured concerning the ports that are let through from outside (e. g. port to access via ssh). – has an IP address: may be a public one or just internal not reachable from outside (=Network Address Translation (NAT)). – needs a root filesystem image with an OS to boot from and to provide libraries and executables. • Upload your own image (in ISO 9660 format) or select pre-defined template ISO image. Possible to add own software afterwards and store this as a new template (storage costs for template occur). Root password resetable! You do not want others to use – has selectable amount of RAM, cores, speed. your favourite root password. – can be created (=boot and run; CPU time + filesystem storage costs), stopped (=freeze; no CPU time, but filesystem storage costs), started again (=unfreeze and run again; CPU time + filesystem storage costs again), deleted (shut down and dispose filesystem; no costs anymore). • Stop (better: delete) instance, when you do not need it anymore! Helmut Neukirchen Otherwise you get charged, even you let your VM instance not really compute anything. 14

Iaa. S Cloud hands-on example • Advania Cloud Services: – Based on qstack Iaa.

Iaa. S Cloud hands-on example • Advania Cloud Services: – Based on qstack Iaa. S cloud implementation. – Thanks to Advania: We have a free contingent for teaching purposes. • Helmut has created accounts for you: – Username: same username as in email address that you provided for workshop registration – however without “. ” in case the email username contains a dot. • In most cases, this is your @hi. is username, but same used, e. g. @gmail (in that case, use the username of your gmail account). – Ask organisers, if you cannot remember the email you used for registration. – Password: to be announced • Log-in: https: //qstack. advania. com Helmut Neukirchen 15

Iaa. S Cloud hands-on example: Tasks 1. 2. 3. 4. Log in to Web

Iaa. S Cloud hands-on example: Tasks 1. 2. 3. 4. Log in to Web interface Change password! Check that cloud firewall has ssh port enabled. Create Linux instance. 1. Choose your favourite distribution. 5. Log in to instance via SSH. 1. Get IP and password from web interface. 6. Do something with your Linux instance. 1. E. g. update software to get security updates. 2. Install/run the software you want to use (Python, R, …). 7. Finally, delete instance. 8. Your account will be deleted after the workshop. Helmut Neukirchen 16

You may have to wait in this hands-on session: Use idle time to fill

You may have to wait in this hands-on session: Use idle time to fill out 5 minute Software Engineering for HPC survey https: //uni. hi. is/helmut or Helmut Neukirchen 17

Iaa. S Cloud hands-on example: log in • Log-in: https: //qstack. advania. com •

Iaa. S Cloud hands-on example: log in • Log-in: https: //qstack. advania. com • Username: same username as in email address that you provided for workshop registration. – But without “. ” if it contains a dot. Helmut Neukirchen 18

Iaa. S Cloud hands-on example: change your password • Even though your account will

Iaa. S Cloud hands-on example: change your password • Even though your account will be deleted after the workshop, you should first change your password. 1. 2. Helmut Neukirchen 19

Check firewall settings to be used by instance 1. 2. 3. Click on “default”

Check firewall settings to be used by instance 1. 2. 3. Click on “default” Helmut Neukirchen 20

Default firewall must have SSH set to “ON” (=SSH port enabled) Must be “ON”

Default firewall must have SSH set to “ON” (=SSH port enabled) Must be “ON” Helmut Neukirchen 21

Create new compute instance 1. 2. Click on “Create new instance” Helmut Neukirchen 22

Create new compute instance 1. 2. Click on “Create new instance” Helmut Neukirchen 22

Instance settings (1) Optional name Operating system to boot as virtual machine image. Choose

Instance settings (1) Optional name Operating system to boot as virtual machine image. Choose OS of your choice. Helmut Neukirchen 23

Instance settings (2) Different CPU speeds VM boot Different RAM sizes image will be

Instance settings (2) Different CPU speeds VM boot Different RAM sizes image will be placed on a 40 GB file system • For this workshop, “Gold” and “ 1 GB” should be more than sufficient! Helmut Neukirchen 24

Create instance Click to create instance • Creating a file system with the boot

Create instance Click to create instance • Creating a file system with the boot image and booting that image takes at least 30 seconds. • Use that time to fill out survey (if you had ever to develop HPC software): https: //uni. hi. is/helmut Helmut Neukirchen 25

A running instance • Once the instance is running… …click on it to get

A running instance • Once the instance is running… …click on it to get details Helmut Neukirchen Public IP address needed to log-in from outside 26

Instance log-in details Click here to see root password username and IP address to

Instance log-in details Click here to see root password username and IP address to be for ssh’ing to this instance Click here to see and use (US keyboard layout) console in Web browser Helmut Neukirchen 27

Log-in to instance • Use your ssh client and the username, IP address and

Log-in to instance • Use your ssh client and the username, IP address and password as explained on previous slides. – Because your ssh client does not know your cloud instance, it is normal that it complains (e. g. “The authenticity of host w. x. y. z can't be established. ”) • NOTE: I had yesterday problems connecting to cloud instance (no response to ssh or ping) – Hopefully it works today! – Otherwise, you can still use the console in Web interface. Helmut Neukirchen 28

Use instance • Now, you have a cloud instance to work with! • E.

Use instance • Now, you have a cloud instance to work with! • E. g: On Debian, e. g. : – Explore instance – Install security updates – Install needed software – Run your software lscpu; free -h apt-get update; apt-get upgrade apt-get install myneededsoftware python; mysoftware Helmut Neukirchen 29

Release cloud resources • Once you finished, do not forget to release your cloud

Release cloud resources • Once you finished, do not forget to release your cloud resource (pay as you go!): – Delete cloud instance, – Release IP address assigned to cloud instance (unless you want to be able to re-use same IP address in future) • Double check via “Instances”, “IP addresses”, “Volumes” that everything has gone. • Finally, you can logout from the web interface. Helmut Neukirchen 30

Release cloud resources 2. Do not keep IP address Helmut Neukirchen 1. Delete instance

Release cloud resources 2. Do not keep IP address Helmut Neukirchen 1. Delete instance 31

Logout 1. Double check that no instances, IP addresses, volumes are listed anymore Helmut

Logout 1. Double check that no instances, IP addresses, volumes are listed anymore Helmut Neukirchen 2. 3. 32

Cloud computing: Advantages • Users do not need to invest into hardware. – “Pay

Cloud computing: Advantages • Users do not need to invest into hardware. – “Pay as you go”: just pay for actual usage. – Access hardware that you otherwhise would not have (e. g. huge RAM, powerfull CUDA GPUs via NVDIA GPU cloud). • Users can scale on demand. – 1 CPU for 100 hours costs same as 100 CPUs for 1 hour, • (Problem: licenses of commercial software: in the latter case, you may need 100 licenses. ) • Cheaper. – Economy of scale (hardware prices, administration cost), – Averaging/multiplexing (better utilisation of hardware), • In average, there always users that need few resource while other need more (statistical multiplexing). Cloud provider can offer computing resources cheaper than a single user that would need to provide resources for the worst-case peak usage scenario. – Energy (move Cloud hardware to where energy & cooling is cheap, e. g. Iceland). Helmut Neukirchen 33

Cloud computing: Disadvantages • Cloud computing is not suitable – if you have already

Cloud computing: Disadvantages • Cloud computing is not suitable – if you have already invested in hardware. • You have the hardware, so use it. – if you are as big as cloud computing providers. • Then, you can do it as cheap as the cloud provider. – if privacy/business secrets are an issue. • Secrets should not leave your organisation. Do you mind giving other people access to your data? Privacy laws may even forbid to transmit data to cloud. – if you want to be in full control of your IT. • Danger of cloud provider having technical problems. • Problem: data. – Getting in to/out from cloud: while traffic in is typically free, traffic out costs. • Additional network load, latency (e. g. Iceland’s location not got for interactive access). – Privacy: do you trust to store your confidential data at some external Cloud provider? (Meltdown & Spectre CPU flaws may give other cloud users access. ) Helmut Neukirchen 34

Virtualisation vs. Containers • Virtualisation via hypervisor: • Container uses Operating Systemprovided separation of

Virtualisation vs. Containers • Virtualisation via hypervisor: • Container uses Operating Systemprovided separation of “user space” – Slow (emulates hardware), (processes, RAM, file system): – Requires a virtual disk as file system for every instance (even if the same OS is used in all instances) Application, libraries – Fast, – Shares OS installation: No need for virtual disks containing duplicates of OS. Guest OS Application, libraries Virtual HW Container manager Hypervisor Operating System Host hardware (CPU, RAM, Disk) Helmut Neukirchen 35

Virtualisation vs. Containers • Virtualisation: Foundation of cloud computing instances. – VM images contain

Virtualisation vs. Containers • Virtualisation: Foundation of cloud computing instances. – VM images contain OS and application and libraries. – Application and dependencies (libraries) need to be manually installed into VM image. • Container: container images contain just the application specific file system used for shipping applications and their dependencies (libraries). – No manual installation of application and dependencies. (Just ship the container image that contains application and all non-standard dependencies that are not part of the underlying OS. ) – May be even used to easy installation of application running in a cloud VM image. • Popular container technologies (not covered for time reasons): – Docker (popular for commercial settings, e. g. allows getting root), – Singularity (popular within HPC, e. g. getting root not allowed – would be No-Go in HPC). Helmut Neukirchen 36

Final words • Iaa. S may give easily access to some hardware that you

Final words • Iaa. S may give easily access to some hardware that you otherwise would not be able to access. – For any virtual hardware that goes beyond what IHPC (Jötunn or Garpur) offers: Cloud can easily get expensive. • Many cloud providers offer free tiers and grants for researchers and students. • I hope, you enjoyed this talk: any questions? Helmut Neukirchen 37