110
1

Intro to the FIWARE Lab

  • Upload
    fiware

  • View
    23

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Intro to the FIWARE Lab

1

Page 2: Intro to the FIWARE Lab

Setting up your virtual infrastructure using FIWARE Lab Cloud

Fernando López AguilarTechnological Expert. IT and Cloud [email protected]@flopezaguilar

Page 3: Intro to the FIWARE Lab

3

Content

FIWARE Lab Cloud Hosting: Overview and Architecture

FIWARE Lab: Basic functionalities

FIWARE Identity Services

FIWARE Compute Services

FIWARE Storage Services

FIWARE Lab: Extended functionalities

FIWARE Network Services

FIWARE Lab: PaaS, working with Blueprints

Reference Information

Page 4: Intro to the FIWARE Lab

FIWARE Lab Cloud Hosting: Overview and Architecture

4

Page 5: Intro to the FIWARE Lab

5

FIWARE Lab Cloud Hosting

Page 6: Intro to the FIWARE Lab

6

FIWARE Lab Cloud Hosting

Cloud Portal PaaS

SDC Monitoring

Account

Page 7: Intro to the FIWARE Lab

7

Summary

Account: Manages identity and organizations; provides authentication and authorization for other services (OpenStack Keystone).

Compute: Manages the lifecycle of compute instances. Responsibilities include spawning, scheduling and decommissioning of VMs (OpenStack Nova).

Network: Enable Network-Connectivity-as-a-Service for other services, e.g. Compute, (OpenStack Neutron).

Storage: Persistent block storage for running compute instances (OpenStack

Cinder). Stores and retrieves arbitrary unstructured data object and provide

storage for other services, e.g. Image, (OpenStack Swift).

Page 8: Intro to the FIWARE Lab

8

Summary

Image: Stores and retrieves VM disk images used by compute

(OpenStack Glance).

Monitoring: Monitoring information about VMs

SDC: Deploying Software in VMs

PaaS Manager Working with regions

Creating Tiers and deploying Blueprints

Page 9: Intro to the FIWARE Lab

9

FIWARE Lab Cloud – Multiregion

Page 10: Intro to the FIWARE Lab

10

FIWARE Lab Cloud – Multiregion

http://fi-health.lab.fiware.org/

Page 11: Intro to the FIWARE Lab

11

Basic functionalities: Identity Services

Page 12: Intro to the FIWARE Lab

12

Identity Services

Creating an account

https://account.lab.fiware.org

Understanding account categories

Understanding organizations

Mapped to OS tenants

Signing in in Cloud Portal

https://cloud.lab.fi-ware.org

SSO

Page 13: Intro to the FIWARE Lab

13

Add new user

Enter your email and passwordto access to the FIWARE Lab.

If you do not have it or forgot it, sign up or request for a new one.

Page 14: Intro to the FIWARE Lab

14

Create new account

You can ask for a trial account.In case there will be not,

you will obtain a basic account

Page 15: Intro to the FIWARE Lab

15

FIWARE Lab Account Categories

Trial

Basic Community

1

2

3

4

5

6

7

Page 16: Intro to the FIWARE Lab

Asking for a community account upgrade

16

Page 17: Intro to the FIWARE Lab

Asking for a community account upgrade

17

Page 18: Intro to the FIWARE Lab

Basic functionalities: Compute Services

18

Page 19: Intro to the FIWARE Lab

19

FIWARE Lab Cloud Hosting: basic functionalities Create your keypair (private key)

Create security group (incoming ports to VM, e.g. 22 for ssh)

Deploy your instance

choice from a library of predefined images, e.g. Centros, Ubuntu, etc.

choice flavor of resource configuration.

choice security group.

choice keypair to ssh into VM.

specify configuration scripts (optional).

Page 20: Intro to the FIWARE Lab

20

FIWARE Lab Cloud Hosting: basic functionalities Associate public IP with the instance.

Page 21: Intro to the FIWARE Lab

21

Create keypair

You must create a keypairto access to the servers.

Page 22: Intro to the FIWARE Lab

22

Create keypair

Page 23: Intro to the FIWARE Lab

23

Create keypair

Page 24: Intro to the FIWARE Lab

24

How to connect from Windows (I)

Install PuTTY and PuTTYgen from http://www.putty.org/

Convert your Keypair to PPK

Start PuTTYgen (e.g. From the Start menu, click All Programs > PuTTY > PuTTYgen)

Click Load and select the Keypair file (e.g. my_cert.pem). You’ll need to display All Files (*.*) to see your Keypair.

Click Open. And select the destination path and name of your PPK file.

Page 25: Intro to the FIWARE Lab

25

How to connect from Windows (II)

Connect to your instance

Start PuTTY.

Put the public IP of your instance (default SSH port is 22).

Configure it to use your Keypair

Open the Auth submenu (Connection > SSH > Auth)

Select the recently generated Private key file (PPK file).

Page 26: Intro to the FIWARE Lab

26

How to obtain your public key from pem file

Secure to have the proper permissions:

$ chmod 600 private.pem

Create the public key:

$ ssh-keygen –y –f private.pem >> publickey.pub

Add the public key to your system

$ cat publickey.pub >> ~/.ssh/id_rsa.pub

Page 27: Intro to the FIWARE Lab

27

How to import your public key into OpenStack

Just go to the .ssh directory and execute

$cat ~/.ssh/id_rsa.pub

Copy and Paste the content in the Public Key textarea.

Assign a keypair name

Press Import Keypair.

Page 28: Intro to the FIWARE Lab

Security groups

Create a Security Group

28

Page 29: Intro to the FIWARE Lab

29

Security groups

Page 30: Intro to the FIWARE Lab

30

Create and edit Security Group rules

Page 31: Intro to the FIWARE Lab

31

Create and edit Security Group rules

Page 32: Intro to the FIWARE Lab

32

Launch Instances

Launch new instance

Page 33: Intro to the FIWARE Lab

33

Launch Instances

Page 34: Intro to the FIWARE Lab

34

Launch Instances

Page 35: Intro to the FIWARE Lab

35

Launch Instances

Drag&Drop the “shared-net”

network

Page 36: Intro to the FIWARE Lab

36

Launch Instances

Do not changeanything here

Page 37: Intro to the FIWARE Lab

37

Launch Instances

Page 38: Intro to the FIWARE Lab

38

Instances Overview

Page 39: Intro to the FIWARE Lab

39

Allocate IP to Project

Allocate new IP

Page 40: Intro to the FIWARE Lab

40

Allocate IP to Project

Allocate new IP

Page 41: Intro to the FIWARE Lab

41

Allocate IP to Project

Page 42: Intro to the FIWARE Lab

42

Allocate IP to Project

Page 43: Intro to the FIWARE Lab

43

Allocate IP to Project

Page 44: Intro to the FIWARE Lab

44

Access to the instance

Page 45: Intro to the FIWARE Lab

Basic functionalities: Storage Services

45

Page 46: Intro to the FIWARE Lab

46

FIWARE Lab Cloud Hosting: storage functionalities

Create volumes

Attach volume to servers

Configure the instance to detect the new volume

Create containers in the object storage

Upload objects into your containers

Object Storage API

Page 47: Intro to the FIWARE Lab

47

Create a volume

Page 48: Intro to the FIWARE Lab

48

Attach a volume to an instance

Page 49: Intro to the FIWARE Lab

49

Volume attached

Page 50: Intro to the FIWARE Lab

50

See the new volume with fdisk

Page 51: Intro to the FIWARE Lab

51

Create a partition table on our new volume

Page 52: Intro to the FIWARE Lab

52

Create a ext3 file system

Page 53: Intro to the FIWARE Lab

53

Mounting our new volume.

Create a mount point called /data and mount /dev/vdb1$ sudo mkdir /data

$ sudo mount /dev/vdb1 /data

At this point, the volume’s storage is accessible to Linux.

Modify /etc/fstab to allow remounts the volume on restarts.

Page 54: Intro to the FIWARE Lab

54

Check the created volume

Page 55: Intro to the FIWARE Lab

55

Object Storage: Create a container

Page 56: Intro to the FIWARE Lab

56

Upload an object into the container

Page 57: Intro to the FIWARE Lab

57

Upload an object to the container

Page 58: Intro to the FIWARE Lab

Extended functionalities: Network Services

58

Page 59: Intro to the FIWARE Lab

59

FIWARE Lab Cloud Hosting: networks functionalities

Create your own network

Create your subnet associate to the previous network

Create a router

Set gateway

Page 60: Intro to the FIWARE Lab

60

FIWARE Lab Cloud Hosting: networks functionalities

Assign subnet

Deploy your instance

Assign public IP to your instance

Check the new instance.

Page 61: Intro to the FIWARE Lab

61

FIWARE Lab Cloud Hosting: working with networks

Multi-tenancy

High or Low?

Do I need to isolate tenants?

Even if you trust them, you might want isolation.

Tenant creates his own network(s) and router(s) allowing complex

network topologies for multi-tier applications.

Page 62: Intro to the FIWARE Lab

62

Create your own network

Create a newNetwork

Page 63: Intro to the FIWARE Lab

63

Create your own network

Assign a nameFor the network

Page 64: Intro to the FIWARE Lab

64

Add subnet associate to the previous network

Add subnet

Page 65: Intro to the FIWARE Lab

65

Add subnet associate to the previous network

Add NetworkAddress (CIDR) Define DNS

server

Page 66: Intro to the FIWARE Lab

66

CIDR notation

10.10.1.32/27 represents:

The given IPv4 address and its associated routing prefix 10.10.1.32, or equivalently.

Its subnet mask 255.255.255.224, which has 27 leading 1-bits.

Page 67: Intro to the FIWARE Lab

67

Create a router

Assign routername

Page 68: Intro to the FIWARE Lab

68

Set gateway

Assign a gatewayto the router

Page 69: Intro to the FIWARE Lab

69

Set gateway

Select the network

Page 70: Intro to the FIWARE Lab

70

Assign interface

Double Click on the router name

Page 71: Intro to the FIWARE Lab

71

Assign interface

Add interface(subnet)

Page 72: Intro to the FIWARE Lab

72

Assign interface

Select the network to connect

Page 73: Intro to the FIWARE Lab

73

Assign interface

Page 74: Intro to the FIWARE Lab

74

Deploy a new instance: Details

Page 75: Intro to the FIWARE Lab

75

Deploy a new instance: Access & Security

Page 76: Intro to the FIWARE Lab

76

Deploy a new instance: Networking

Select the network to connect

Page 77: Intro to the FIWARE Lab

77

Deploy a new instance: connect to VM display

Select connect to Interface

Page 78: Intro to the FIWARE Lab

78

Deploy a new instance: connect to VM display

Page 79: Intro to the FIWARE Lab

79

Assign public IP to your instance

Page 80: Intro to the FIWARE Lab

80

Check the new instance

Page 81: Intro to the FIWARE Lab

Extended functionalities: PaaS, working with Blueprints

81

Page 82: Intro to the FIWARE Lab

82

FIWARE Lab Cloud Hosting

Deploying components for your application.

Create blueprint templates.

Create Tiers on a blueprint template.

Page 83: Intro to the FIWARE Lab

83

FIWARE Lab Cloud Hosting

Launch blueprint templates -> create blueprint instances

See details of the blueprint instance

Check the SW installed on the blueprint instance

Page 84: Intro to the FIWARE Lab

84

Real scenario

Users want to define lots of parameters.

Password, ports, default installation.

Users want to install several things in the same server.

Tomcat + git, tomcat + java + git, …

Users need to deploy complex environment.

One server for Tomcat, another for MySQL, …

Some parameters are unknown before instantiate the system.

Page 85: Intro to the FIWARE Lab

85

Deploying components for your application

Deploying applications and not only Servers.

Ad hoc installation (not template usage).

Managing applications in Servers (install, uninstall, configure, snapshot…).

Deploying different environments for that applications.

Page 86: Intro to the FIWARE Lab

86

Deploy example Blueprint Template: platform specification

to be deployed.

Tier: Each kind of software and server to be deployed.

Each Tier can be deployed in one or several servers (e.g. tomcat, 2-5 servers).

Blueprint Instance: Deployed in the testbed.

Blueprint template: fiware1

Tier 1: Tomcat

Tier 2: Context Broker Tier 3: MongoDB

Server: 1 Server: 1

Servers: 2-5

Context Broker

Context Broker

Page 87: Intro to the FIWARE Lab

87

Create a new blueprint template

Press the option“Blueprint Templates”

from menu

You can open the Catalog of Blueprint Template or create one

from the scratch.

Page 88: Intro to the FIWARE Lab

88

Create a new blueprint template

You should introduce the “Name” and the “Description”.

Page 89: Intro to the FIWARE Lab

89

Add tiers

To add new Tier, press“demo-template” name.

Page 90: Intro to the FIWARE Lab

90

Add tiers After press “Add Tier” you seethis windows to define the servers of this tier.

You must select a Keypairto access to those servers.

You should specify the maximum, minimum and current

number of servers

Page 91: Intro to the FIWARE Lab

91

Add software in tier

Install software pressingthe mouse right click.

Page 92: Intro to the FIWARE Lab

92

Add software in tier

Edit special attributes like default port.

Page 93: Intro to the FIWARE Lab

93

Add software in tier

Page 94: Intro to the FIWARE Lab

94

Connect network

Drag&Drop the network to connect the tier..

Introduce an alias to connect together several tiers.

Page 95: Intro to the FIWARE Lab

95

Topology

Page 96: Intro to the FIWARE Lab

96

Launch a Blueprint Template -> Blueprint Instance Press “Action” and select

“Launch Template” to launchthe Instance.

Page 97: Intro to the FIWARE Lab

97

Launch a Blueprint Template -> Blueprint Instance

You should specify the “Name” and “Description” for

your blueprint.

Page 98: Intro to the FIWARE Lab

98

Demo

Firstly, the deploymentof infrastructure.

Page 99: Intro to the FIWARE Lab

99

Demo

Secondly, the installationof the software.

Page 100: Intro to the FIWARE Lab

100

Demo

Finally, if all was ok.Pressing the name you can

see the tiers of this blueprint.

Page 101: Intro to the FIWARE Lab

101

Demo

Press it to get informationof your server.

Page 102: Intro to the FIWARE Lab

102

Demo

Page 103: Intro to the FIWARE Lab

103

Demo

Page 104: Intro to the FIWARE Lab

104

Demo

Page 105: Intro to the FIWARE Lab

Reference Information

105

Page 107: Intro to the FIWARE Lab

107

Page 108: Intro to the FIWARE Lab

108

If you have any question or problem contact to

[email protected]

You can go to stackoverflow and ask question with the tag fiware and/or filab.

Page 109: Intro to the FIWARE Lab

109

Thank you!

http://fiware.orgFollow @FIWARE on Twitter

Page 110: Intro to the FIWARE Lab

Thank you!

http://fiware.orgFollow @FIWARE on Twitter