370 likes | 400 Views
Introduction to using Cloud Computing. Helmut Neukirchen University of Iceland helmut@hi.is. 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 !
E N D
Introduction to using Cloud Computing Helmut Neukirchen University of Iceland helmut@hi.is
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
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: 2x Intel Xeon CPU E5-2690 v3 (2.6 GHz, 12 core) • RAM: 128 GB DDR4 Helmut Neukirchen
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: 2x Intel Xeon E5-2680v3 (2.5 GHz, 12 core) • RAM: 128 GB (8x16 GB DDR4 2133 MHz) • 8 “himem” nodes, each: • CPU: 2x Intel Xeon E5-2698v3 (2.3 GHz, 16 core) • RAM: 256 GB (16x16 GB DDR4 2133 MHz) • 46 “omnip” nodes, each: • CPU: 2x Intel Xeon Gold 6130 CPU (2.10 GHz, 16 core) • RAM: 192 GB DDR4 • 3 “gpu” nodes, each: • CPU: 2x Intel Xeon E5-2648L (1.8 GHz, 8 core) • RAM: 64 GB (1x) & 80 GB (2x) • GPU: 2x NVIDIA Tesla M2090 Helmut Neukirchen
Your compute job does not fit your computer? • Resources in Iceland are still too small? • NeIC 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
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 “x1e.32xlarge” Elastic Compute Cloud node: • CPU: 4x Intel Xeon E7 8880 v3 (2.3 GHz, 18 core) 72 cores • RAM: 3904 GB DDR4 • 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
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 and 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
What is Cloud computing? A possible definition • Cloud computing: Provide computer resources on demand and access them via a network. • Historic example: Amazon invested into hardware to handle Christmas shopping peak. • 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. The Internet is often visualised as a cloud Cloud computing Helmut Neukirchen
Cloud computing service models (1/2) • Infrastructure as a Service (IaaS): • 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
Cloud computing service models (2/2) • Platform as a service (PaaS): • Provide virtual platform (APIs for typical services, e.g. database) to run SaaS 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 (SaaS): • 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
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
Example cloud provider: Amazon Elastic Compute Cloud EC2 (IaaS) • EC2 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 EC2, 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 EC2 instance. • Simple Storage Service (S3): storage as object/file. • Easily accessible via Web. • Many competitors, e.g. Google Compute Engine, Microsoft Azure, … Helmut Neukirchen
Amazon EC2 Pricing examples(without VAT) as of 6/2018 • EU Ireland data centre (US typically cheaper) EC2 instances: • t2.nano: 1 virtual core, 0.5 GB RAM, $0.0063 / Hour • m5.24xlarge: 96 virtual cores, 384 GB RAM, $5.136 / Hour • x1e.32xlarge: 128 virtual cores, 3904 GB RAM, $32 / Hour • GPUs available as well (but OpenGL only, no NVDIA CUDA). • Storage costs as well (there is no “idle” storage: cannot be multiplexed like CPUs more expensive) • EBS Cold HDD (sc1): $0.028 per GB-month • EBS Provisioned Input/output Operations Per Second (IOPS) SSD (io1): $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
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 rootfilesystem 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! • has selectable amount of RAM, cores, speed. • 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! You do not want others to use your favourite root password. Otherwise you get charged, even you let your VM instance not really compute anything. Helmut Neukirchen
IaaS Cloud hands-on example • Advania Cloud Services: • Based on qstack IaaS 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
IaaS Cloud hands-on example: Tasks • Log in to Web interface • Change password! • Check that cloud firewall has ssh port enabled. • Create Linux instance. • Choose your favourite distribution. • Log in to instance via SSH. • Get IP and password from web interface. • Do something with your Linux instance. • E.g. update software to get security updates. • Install/run the software you want to use (Python, R, …). • Finally, delete instance. • Your account will be deleted after the workshop. Helmut Neukirchen
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
IaaS 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
IaaS 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
Check firewall settings to be used by instance 1. 2. 3. Click on “default” Helmut Neukirchen
Default firewall must have SSH set to “ON” (=SSH port enabled) Must be “ON” Helmut Neukirchen
Create new compute instance 1. 2. Click on “Create new instance” Helmut Neukirchen
Instance settings (1) Optional name Operating system to boot as virtual machine image. Choose OS of your choice. Helmut Neukirchen
Instance settings (2) Different CPU speeds VM boot image will be placed on a 40 GB file system • For this workshop, “Gold” and “1 GB” should be more than sufficient! Different RAM sizes Helmut Neukirchen
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
A running instance • Once the instance is running… Public IP address needed to log-in from outside …click on it to get details Helmut Neukirchen
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 key-board layout)console in Web browser Helmut Neukirchen
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
Use instance • Now, you have a cloud instance to work with! • E.g: • Explore instance • Install security updates • Install needed software • Run your software On Debian, e.g.:lscpu; free -h apt-get update; apt-get upgrade apt-get install myneededsoftware python; mysoftware Helmut Neukirchen
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
Release cloud resources 2. Do not keep IP address 1. Delete instance Helmut Neukirchen
Logout 2. 1. Double check that no instances, IP addresses, volumes are listed anymore 3. Helmut Neukirchen
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 are 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
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
Virtualisation vs. Containers • Container uses Operating System-provided separation of “user space” (processes, RAM, file system): • Fast, • Shares OS installation: No need for virtual disks containing duplicates of OS. • Virtualisation via hypervisor: • Slow (emulates hardware), • Requires a virtual disk as file system for every instance (even if the same OS is used in all instances) Application, libraries Application, libraries Guest OS Guest OS Application, libraries Application, libraries Container manager Virtual HW Virtual HW Operating System Hypervisor Host hardware (CPU, RAM, Disk) Host hardware (CPU, RAM, Disk) Helmut Neukirchen
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
Final words • IaaS 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