SlideShare uma empresa Scribd logo
1 de 34
Deploy Mediawiki using Fiware Lab facilities
José Ignacio Carretero Guarde
R&D Engineer at Telefonica I+D. In charge of Spain FIWARE Lab Node
joseignacio.carreteroguarde@telefonica.com
Mediawiki and FIWARE Lab APIs (Openstack)
2
3
What Mediawiki has to do with FIWARE Lab (I)
Nothing?
4
...But it could be good vehicle to show some things about FIWARE
Lab IaaS reference Implementation GE.
What Mediawiki has to do with FIWARE Lab (II)
5
●
Why Wikimedia? – If it has nothing to do with FIWARE.
●
It has a backend Database (Mysql)
●
It has a Frontend Web Server (Apache)
●
I Allows me to show some tools: IaaS GE.
●
I Know how it Works, So I can automate it.
●
Images and files are stored in Apache (…/wiki/images)
●
Data in the database is stored in /var/lib/mysql
Installing an Applicacion: Mediawiki
6
●
https://catalogue.fiware.org/enablers/iaas-ge-fiware-reference-implement
●
“We are using OpenStack Vanilla release for the IaaS GE.”
●
Openstack APIs work:
●
Compute APIs
●
Block Storage APIs
●
Image Service
●
Object Storage
●
There are CLIs writen in Python...
IaaS GE – FIWARE Reference Implementation
7
# Assuming Python 2.7, pip and virtualenv installed
virtualenv osdemo
source osdemo/bin/activate
pip install python-openstackclient
pip install python-swiftclient
How to locally install the CLIs
A First Approach to the Installation Process
8
9
Installing an Applicacion: Mediawiki (I)
10
●
Virtual Machines – Instances
●
Instances are managed by Nova.
●
We need a few things before deploying an instance
●
A Keypair
●
In order to be Able to SSH our instances
●
Security Groups/Rules
●
Because OpenStack acts like a closed Firewall for every
instance.
Create a first VM
11
# Creating the keypair
nova keypair-add summitkp | tee summitkp && chmod 400 summitkp
# Creating the security group and rules
nova secgroup-create openthings opens_some_ports
nova secgroup-add-rule openthings tcp 22 22 0/0
nova secgroup-add-rule openthings tcp 80 80 0/0
nova secgroup-add-rule openthings icmp -1 -1 0/0
# Creating the security group and rules (What I did!):
nova secgroup-create allopen open_everything
nova secgroup-add-rule allopen tcp 1 65535 0/0
nova secgroup-add-rule allopen ucp 1 65535 0/0
nova secgroup-add-rule allopen icmp -1 -1 0/0
Nova: Key Pairs and Security Groups
12
●
Boot our first instance with some parameters
●
(At least) One network ID to allow networking
●
Flavor – The size of the Instance
●
Our Security Group – our firewall configuration.
●
A Keypair – To SSH our instance
●
The base image – I’ll use an Ubuntu in the demos.
●
Assign a floating IP to some of our instances
●
A Floating IP is needed to SSH our instances. We might not be
able to SSH private IPs
●
1 Floating IP is allowed per User.
Create a first VM (ii)
13
# Find the network ID
NETUUID=$(openstack network list | awk '/ node-int-net-01 / {print $2}')
# Boot Virtual Machine
nova boot --nic net-id=$NETUUID --image base_ubuntu_14.04 
--key-name summitkp 
--security-groups allopen 
--flavor m1.small mydatabase
# Creating a floating IP:
PUBLIC_EXT_NET=public-ext-net-01
openstack floating ip create $PUBLIC_EXT_NET
# Associate the IP to our instance:
nova list floating ip create $PUBLIC_EXT_NET
openstack floating list
nova floating-ip-associate mydatabase 130.206.112.0
Nova: Boot and add a floating IP
14
# Get console URL
nova get-vnc-console mydatabase novnc
# Creating the security group and rules
nova console-log mydatabase
Nova: Consoles
15
●
Compute is thought to Compute
●
When Instances die, Ephemeral disks die
●
Persistent Disk – Block Storage
●
Cinder manages Persistent Disks
●
The disks, once created can be attached to instances
●
Instances must format (once) and mount the disks before use
●
Persistent disk will survive Instances.
●
A way to Keep data apart from computation.
Cinder: Ephemeral Vs Persistent disks
16
# Create a Persistent disk
openstack volume create --size 1 myvolume
openstack volume list
VOLUMEID=$(openstack volume list | awk '/ myvolume / {print $2}')
# Attaching the volume to the instance
nova volume-attach mydatabase $VOLUMEID
# Or attaching at boot time…
nova boot --nic net-id=$NETUUID --image base_ubuntu_14.04 
--key-name summitkp 
--security-groups allopen 
--block-device-mapping vdb=$VOLUMEID
--flavor m1.small mydatabase
Cinder: Persistent Disk Creation
Automate!!!
17
18
●
Increase Productivity
●
Automated processes reduce defects
●
Reduce Human Errors
●
Processes are run effortlessly
●
Processes are more flexible => Changes are easier
●
Increase satisfaction
●
… You can write many other things here
●
… And here.
Automate: Why?
19
Automate: Using GUI (Cloud Portal)
(maybe... )
Too many clicks
(maybe)...
Too error prone
(almost)...
Impossible automation
Easy to use
20
●
Tools to automate
●
Puppet/Chef
●
An Agent is required in the instance
●
Ansible
●
Many features, even some for OpenStack
●
Some OpenStack Tools
●
Heat / Murano
●
Ad Hoc Scripts
●
This time it was my option, so I can show some CLI
commands
Automate: How?
21
Installing an Applicacion: Mediawiki (II)
/var/www/html/wiki/images /var/lib/mysql
apache-vol kmysql-vol
22
●
Create the Persistent Disk (if it doesn’t exists)
●
Boot the VM attaching the Persistent Disk and injecting a Script
●
The Script
●
Formats the Persistent Disk and mounts it (using /etc/fstab)
●
/var/lib/mysql
●
Installs MySQL-Server software
●
Creates Database and user for the Wiki.
One Installation Process: Database
23
●
Create the Persistent Disk (if it doesn’t exists)
●
Boot the VM attaching the Persistent Disk and injecting a Script
●
The Script
●
Formats the Persistent Disk
●
Installs Apache, php5, libs, etc
●
Downloads Wikimedia and untars it /var/www/html
●
Downloads SyntaxHighlight_plugin and untars it.
●
Mounts the disk (/var/www/html/wiki/images)
●
Creates a FloatingIP and associates it to the instance
One Installation Process: Apache
24
# Or attaching at boot time…
nova boot --nic net-id=$NETUUID --image base_ubuntu_14.04 
--key-name summitkp 
--security-groups allopen 
--block-device-mapping vdb=$VOLUMEID
--user-data oneScript
--flavor m1.small mydatabase
The new boot command for Nova
25
The Mediawiki Wizard
26
●
Mediawiki installation can’t be automated… but
●
I can automate LocalSettings.php configuration
●
The Script
●
Gets the Public IP of our apache
●
Sets the Logo, Extensions of Documents which can be uploaded
●
Configures SyntaxHighlight extension
●
Uploads LocalSettings.php and logo.jpg
Can’t automate everything... but almost
Some other tools: Images and Object Storage
27
28
●
I can take Snapshots of my instances
●
So I can boot a preconfigured Instance
●
Glance - The image service is used to create Snapshots
●
I’ve taken an Snapshot of my Database Instance
●
The process takes some time...
●
It is a complicated process that involves many subprocesses
Snapshots from instances
29
# Create an Snapshot from an Instance
nova image-create krtmysql krtmysql-snp
# List images
openstack image list
# Delete images
openstack image delete $IMAGE_ID
Image Commands
30
●
It stores static Objects
●
We can retrieve the objects in the future
●
Swift is the reference implementation of FIWARE’s Object
Storage GE
●
https://catalogue.fiware.org/enablers/object-storage-ge-fiware-imple
●
Objects are Stored in containers
●
I’ve uploaded my Preconfigured Mediawiki in a .tgz file to Object
Store
●
Let’s use this in next Mediawiki installations (as a demo)
Object Storage
31
# Create a new Container
swift post summit
# Upload an object to the Container
swift upload summit wiki.tgz
# List Containers, list objects from a container
swift list
swift list summit
# Retrieve an object from a container
swift download summit wiki.tgz
Swift Commands
32
# Retrieve an object from a container… In some scripts.
token=($(openstack token issue | 
awk '/ id / || / project_id / {print $4}'))
TOKEN=${token[0]}
TENANT_ID=${token[1]}
URL=http://130.206.112.3:8080/v1
…
# Use the token, and the tenant.
swift --os-auth-token $TOKEN --os-storage-
url=$URL/AUTH_$TENANT_ID download summit wiki.tgz
Swift Commands (to automate)
https://github.com/jicarretero/SummitMalaga2016
33
Thank you!
http://fiware.org
Follow @FIWARE on Twitter

Mais conteúdo relacionado

Mais procurados

Third Party Auth in WebObjects
Third Party Auth in WebObjectsThird Party Auth in WebObjects
Third Party Auth in WebObjects
WO Community
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
ke4qqq
 
Integrating OpenStack with Active Directory
Integrating OpenStack with Active DirectoryIntegrating OpenStack with Active Directory
Integrating OpenStack with Active Directory
cjellick
 
Attacking Oracle with the Metasploit Framework
Attacking Oracle with the Metasploit FrameworkAttacking Oracle with the Metasploit Framework
Attacking Oracle with the Metasploit Framework
Chris Gates
 

Mais procurados (20)

Dev stacklabguide
Dev stacklabguideDev stacklabguide
Dev stacklabguide
 
Open Stack compute-service-nova
Open Stack compute-service-novaOpen Stack compute-service-nova
Open Stack compute-service-nova
 
Deploy MediaWiki usgin Fiware Lab Facilities
Deploy MediaWiki usgin Fiware Lab FacilitiesDeploy MediaWiki usgin Fiware Lab Facilities
Deploy MediaWiki usgin Fiware Lab Facilities
 
Lab Manual reModernize - Updating and Consolidating MySQL
Lab Manual reModernize - Updating and Consolidating MySQLLab Manual reModernize - Updating and Consolidating MySQL
Lab Manual reModernize - Updating and Consolidating MySQL
 
Docker Runtime Security
Docker Runtime SecurityDocker Runtime Security
Docker Runtime Security
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David Nalley
 
Third Party Auth in WebObjects
Third Party Auth in WebObjectsThird Party Auth in WebObjects
Third Party Auth in WebObjects
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
 
Wordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccionWordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccion
 
Docker orchestration v4
Docker orchestration v4Docker orchestration v4
Docker orchestration v4
 
Openstack in 10 mins
Openstack in 10 minsOpenstack in 10 mins
Openstack in 10 mins
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
 
The state of the swarm
The state of the swarmThe state of the swarm
The state of the swarm
 
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Running High Performance and Fault Tolerant Elasticsearch Clusters on DockerRunning High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
 
Docker on openstack by OpenSource Consulting
Docker on openstack by OpenSource ConsultingDocker on openstack by OpenSource Consulting
Docker on openstack by OpenSource Consulting
 
Integrating OpenStack with Active Directory
Integrating OpenStack with Active DirectoryIntegrating OpenStack with Active Directory
Integrating OpenStack with Active Directory
 
Enhancing OpenShift Security for Business Critical Deployments
Enhancing OpenShift Security for Business Critical DeploymentsEnhancing OpenShift Security for Business Critical Deployments
Enhancing OpenShift Security for Business Critical Deployments
 
Attacking Oracle with the Metasploit Framework
Attacking Oracle with the Metasploit FrameworkAttacking Oracle with the Metasploit Framework
Attacking Oracle with the Metasploit Framework
 
Cluster Lifecycle Landscape
Cluster Lifecycle LandscapeCluster Lifecycle Landscape
Cluster Lifecycle Landscape
 
Kubernetes deployment on bare metal with container linux
Kubernetes deployment on bare metal with container linuxKubernetes deployment on bare metal with container linux
Kubernetes deployment on bare metal with container linux
 

Semelhante a Deploy Mediawiki Using FIWARE Lab Facilities

Puppet and CloudStack
Puppet and CloudStackPuppet and CloudStack
Puppet and CloudStack
ke4qqq
 
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic UsageOpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
OpenNebula Project
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
ke4qqq
 

Semelhante a Deploy Mediawiki Using FIWARE Lab Facilities (20)

Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
 
ApacheCloudStack
ApacheCloudStackApacheCloudStack
ApacheCloudStack
 
openQA hands on with openSUSE Leap 42.1 - openSUSE.Asia Summit ID 2016
openQA hands on with openSUSE Leap 42.1 - openSUSE.Asia Summit ID 2016openQA hands on with openSUSE Leap 42.1 - openSUSE.Asia Summit ID 2016
openQA hands on with openSUSE Leap 42.1 - openSUSE.Asia Summit ID 2016
 
Puppet and CloudStack
Puppet and CloudStackPuppet and CloudStack
Puppet and CloudStack
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStack
 
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic UsageOpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
 
OpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on TutorialOpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on Tutorial
 
FIWARE Lab Cloud Portal
FIWARE Lab Cloud PortalFIWARE Lab Cloud Portal
FIWARE Lab Cloud Portal
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Locally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another HypervisorsLocally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another Hypervisors
 
New Jersey Red Hat Users Group Presentation: Provisioning anywhere
New Jersey Red Hat Users Group Presentation: Provisioning anywhereNew Jersey Red Hat Users Group Presentation: Provisioning anywhere
New Jersey Red Hat Users Group Presentation: Provisioning anywhere
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor Workshop
 
Using Puppet in Small Infrastructures
Using Puppet in Small InfrastructuresUsing Puppet in Small Infrastructures
Using Puppet in Small Infrastructures
 
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 
Booting Weblogic - OOW14
Booting Weblogic - OOW14Booting Weblogic - OOW14
Booting Weblogic - OOW14
 
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE LabHow to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 

Mais de FIWARE

Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FIWARE
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
FIWARE
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
FIWARE
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FIWARE
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FIWARE
 

Mais de FIWARE (20)

Behm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptxBehm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptx
 
Katharina Hogrebe Herne Digital Days.pdf
 Katharina Hogrebe Herne Digital Days.pdf Katharina Hogrebe Herne Digital Days.pdf
Katharina Hogrebe Herne Digital Days.pdf
 
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptxChristoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
 
Behm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptxBehm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptx
 
Evangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptxEvangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptx
 
Lukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptxLukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptx
 
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptxPierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
 
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptxDennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptx
 
Ulrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptxUlrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptx
 
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptxAleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
 
Water Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdfWater Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdf
 
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
 
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptxFiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
 
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptxHTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
 
WE_LoRaWAN _ IoT.pptx
WE_LoRaWAN  _ IoT.pptxWE_LoRaWAN  _ IoT.pptx
WE_LoRaWAN _ IoT.pptx
 
EU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptxEU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptx
 

Último

一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
Asmae Rabhi
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
galaxypingy
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
pxcywzqs
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 

Último (20)

Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 

Deploy Mediawiki Using FIWARE Lab Facilities

  • 1. Deploy Mediawiki using Fiware Lab facilities José Ignacio Carretero Guarde R&D Engineer at Telefonica I+D. In charge of Spain FIWARE Lab Node joseignacio.carreteroguarde@telefonica.com
  • 2. Mediawiki and FIWARE Lab APIs (Openstack) 2
  • 3. 3 What Mediawiki has to do with FIWARE Lab (I) Nothing?
  • 4. 4 ...But it could be good vehicle to show some things about FIWARE Lab IaaS reference Implementation GE. What Mediawiki has to do with FIWARE Lab (II)
  • 5. 5 ● Why Wikimedia? – If it has nothing to do with FIWARE. ● It has a backend Database (Mysql) ● It has a Frontend Web Server (Apache) ● I Allows me to show some tools: IaaS GE. ● I Know how it Works, So I can automate it. ● Images and files are stored in Apache (…/wiki/images) ● Data in the database is stored in /var/lib/mysql Installing an Applicacion: Mediawiki
  • 6. 6 ● https://catalogue.fiware.org/enablers/iaas-ge-fiware-reference-implement ● “We are using OpenStack Vanilla release for the IaaS GE.” ● Openstack APIs work: ● Compute APIs ● Block Storage APIs ● Image Service ● Object Storage ● There are CLIs writen in Python... IaaS GE – FIWARE Reference Implementation
  • 7. 7 # Assuming Python 2.7, pip and virtualenv installed virtualenv osdemo source osdemo/bin/activate pip install python-openstackclient pip install python-swiftclient How to locally install the CLIs
  • 8. A First Approach to the Installation Process 8
  • 10. 10 ● Virtual Machines – Instances ● Instances are managed by Nova. ● We need a few things before deploying an instance ● A Keypair ● In order to be Able to SSH our instances ● Security Groups/Rules ● Because OpenStack acts like a closed Firewall for every instance. Create a first VM
  • 11. 11 # Creating the keypair nova keypair-add summitkp | tee summitkp && chmod 400 summitkp # Creating the security group and rules nova secgroup-create openthings opens_some_ports nova secgroup-add-rule openthings tcp 22 22 0/0 nova secgroup-add-rule openthings tcp 80 80 0/0 nova secgroup-add-rule openthings icmp -1 -1 0/0 # Creating the security group and rules (What I did!): nova secgroup-create allopen open_everything nova secgroup-add-rule allopen tcp 1 65535 0/0 nova secgroup-add-rule allopen ucp 1 65535 0/0 nova secgroup-add-rule allopen icmp -1 -1 0/0 Nova: Key Pairs and Security Groups
  • 12. 12 ● Boot our first instance with some parameters ● (At least) One network ID to allow networking ● Flavor – The size of the Instance ● Our Security Group – our firewall configuration. ● A Keypair – To SSH our instance ● The base image – I’ll use an Ubuntu in the demos. ● Assign a floating IP to some of our instances ● A Floating IP is needed to SSH our instances. We might not be able to SSH private IPs ● 1 Floating IP is allowed per User. Create a first VM (ii)
  • 13. 13 # Find the network ID NETUUID=$(openstack network list | awk '/ node-int-net-01 / {print $2}') # Boot Virtual Machine nova boot --nic net-id=$NETUUID --image base_ubuntu_14.04 --key-name summitkp --security-groups allopen --flavor m1.small mydatabase # Creating a floating IP: PUBLIC_EXT_NET=public-ext-net-01 openstack floating ip create $PUBLIC_EXT_NET # Associate the IP to our instance: nova list floating ip create $PUBLIC_EXT_NET openstack floating list nova floating-ip-associate mydatabase 130.206.112.0 Nova: Boot and add a floating IP
  • 14. 14 # Get console URL nova get-vnc-console mydatabase novnc # Creating the security group and rules nova console-log mydatabase Nova: Consoles
  • 15. 15 ● Compute is thought to Compute ● When Instances die, Ephemeral disks die ● Persistent Disk – Block Storage ● Cinder manages Persistent Disks ● The disks, once created can be attached to instances ● Instances must format (once) and mount the disks before use ● Persistent disk will survive Instances. ● A way to Keep data apart from computation. Cinder: Ephemeral Vs Persistent disks
  • 16. 16 # Create a Persistent disk openstack volume create --size 1 myvolume openstack volume list VOLUMEID=$(openstack volume list | awk '/ myvolume / {print $2}') # Attaching the volume to the instance nova volume-attach mydatabase $VOLUMEID # Or attaching at boot time… nova boot --nic net-id=$NETUUID --image base_ubuntu_14.04 --key-name summitkp --security-groups allopen --block-device-mapping vdb=$VOLUMEID --flavor m1.small mydatabase Cinder: Persistent Disk Creation
  • 18. 18 ● Increase Productivity ● Automated processes reduce defects ● Reduce Human Errors ● Processes are run effortlessly ● Processes are more flexible => Changes are easier ● Increase satisfaction ● … You can write many other things here ● … And here. Automate: Why?
  • 19. 19 Automate: Using GUI (Cloud Portal) (maybe... ) Too many clicks (maybe)... Too error prone (almost)... Impossible automation Easy to use
  • 20. 20 ● Tools to automate ● Puppet/Chef ● An Agent is required in the instance ● Ansible ● Many features, even some for OpenStack ● Some OpenStack Tools ● Heat / Murano ● Ad Hoc Scripts ● This time it was my option, so I can show some CLI commands Automate: How?
  • 21. 21 Installing an Applicacion: Mediawiki (II) /var/www/html/wiki/images /var/lib/mysql apache-vol kmysql-vol
  • 22. 22 ● Create the Persistent Disk (if it doesn’t exists) ● Boot the VM attaching the Persistent Disk and injecting a Script ● The Script ● Formats the Persistent Disk and mounts it (using /etc/fstab) ● /var/lib/mysql ● Installs MySQL-Server software ● Creates Database and user for the Wiki. One Installation Process: Database
  • 23. 23 ● Create the Persistent Disk (if it doesn’t exists) ● Boot the VM attaching the Persistent Disk and injecting a Script ● The Script ● Formats the Persistent Disk ● Installs Apache, php5, libs, etc ● Downloads Wikimedia and untars it /var/www/html ● Downloads SyntaxHighlight_plugin and untars it. ● Mounts the disk (/var/www/html/wiki/images) ● Creates a FloatingIP and associates it to the instance One Installation Process: Apache
  • 24. 24 # Or attaching at boot time… nova boot --nic net-id=$NETUUID --image base_ubuntu_14.04 --key-name summitkp --security-groups allopen --block-device-mapping vdb=$VOLUMEID --user-data oneScript --flavor m1.small mydatabase The new boot command for Nova
  • 26. 26 ● Mediawiki installation can’t be automated… but ● I can automate LocalSettings.php configuration ● The Script ● Gets the Public IP of our apache ● Sets the Logo, Extensions of Documents which can be uploaded ● Configures SyntaxHighlight extension ● Uploads LocalSettings.php and logo.jpg Can’t automate everything... but almost
  • 27. Some other tools: Images and Object Storage 27
  • 28. 28 ● I can take Snapshots of my instances ● So I can boot a preconfigured Instance ● Glance - The image service is used to create Snapshots ● I’ve taken an Snapshot of my Database Instance ● The process takes some time... ● It is a complicated process that involves many subprocesses Snapshots from instances
  • 29. 29 # Create an Snapshot from an Instance nova image-create krtmysql krtmysql-snp # List images openstack image list # Delete images openstack image delete $IMAGE_ID Image Commands
  • 30. 30 ● It stores static Objects ● We can retrieve the objects in the future ● Swift is the reference implementation of FIWARE’s Object Storage GE ● https://catalogue.fiware.org/enablers/object-storage-ge-fiware-imple ● Objects are Stored in containers ● I’ve uploaded my Preconfigured Mediawiki in a .tgz file to Object Store ● Let’s use this in next Mediawiki installations (as a demo) Object Storage
  • 31. 31 # Create a new Container swift post summit # Upload an object to the Container swift upload summit wiki.tgz # List Containers, list objects from a container swift list swift list summit # Retrieve an object from a container swift download summit wiki.tgz Swift Commands
  • 32. 32 # Retrieve an object from a container… In some scripts. token=($(openstack token issue | awk '/ id / || / project_id / {print $4}')) TOKEN=${token[0]} TENANT_ID=${token[1]} URL=http://130.206.112.3:8080/v1 … # Use the token, and the tenant. swift --os-auth-token $TOKEN --os-storage- url=$URL/AUTH_$TENANT_ID download summit wiki.tgz Swift Commands (to automate)