SlideShare une entreprise Scribd logo
1  sur  62
Télécharger pour lire hors ligne
The Rise
of
Mobility
Guido
Nebiolo
Matteo
Madeddu
- Il Problema
- La Soluzione
  - Core
  - API
- Sviluppi
- Q&A
Il Problema
Questo è … {{your_name}}
Matteo viaggia molto
Non è troppo in forma
Non è troppo in forma
E’ sempre nelle curve
Lancia spesso npm i
In pratica, Matteo
ha un po’ di guai da risolvere
??
In pratica, Matteo
ha un po’ di guai da risolvere
!!!
Idea: portable code
environment in cloud!
Idea: portable code
environment in cloud!
Idea: portable code
environment in cloud!
e IoT Button
come laptop
!!!
La soluzione
ImplementazioneSoluzione
CoreAPIButton
!!!
La soluzione
Core
ImplementazioneSoluzione
CoreAPIButton
github.com/cdr/code-server
Visual Code Studio - Server
Creazione dell’ambiente
di sviluppo
MyCodeServerInstance:
Type: "AWS::EC2::Instance"
Properties:
ImageId: String # OS image to run on instance
InstanceType: String # CPU, Ram, network, etc
KeyName: String # KeyPair name
SubnetId: String # Subnet ID
UserData: String # Run commands
MeteData: String # cfn-init
Volumes: # Volume attached
- Volume
Step 1: Creazione Della Macchina
Step 2: Configurazione
dell’Ambiente di Sviluppo
  UserData: # UserData section
    !Base64:
      !Join: # Steps to run the init session
        - ""
        - - "#!/bin/bash -xen"
          - "/opt/aws/bin/cfn-init -v "
          - "         --stack "
          - !Ref AWS::StackName
          - "         --resource CodeServerPublicInstance"
          - "         --configsets end-to-end"
          - "         --region "
          - !Ref AWS::Region
          - "n"
  Metadata: # MetaData section
    AWS::CloudFormation::Init:
      configSets:
        end-to-end:
          - Install # Steps to install packages
          - Setup # Steps to setup development environment
          - Service # Steps to run the service     
Install:
        packages:
          yum:
            docker: [] # Install base packages
            wget: []
            gzip: []
            git: []
……
# Steps to setup development environment
……
Setup:
   # Retrieve of secrets from AWS vault
files:
     "/etc/pki/CA/private/cert1.pem":
       content:
         Fn::Join:
           - ""
           - - ""
             - !Ref CertificateParameterName
      mode: "000600"
       owner: root
       group: root
  
   "/etc/pki/CA/private/privkey1.pem":
       content:
         Fn::Join:
           - ""
           - - ""
             - !Ref PrivateKeyParameterName
      mode: "000600"
       owner: root
       group: root
# Steps to setup development environment
……
Setup:
……
# Commands to install environment
commands:
020-wget:
   command: wget https://github.com/cdr/code-server/releases/
download/1.1156-vsc1.33.1/code-server1.1156-vsc1.33.1-linux-
x64.tar.gz
    cwd: “~"
  030-untar-cleanup:
    command: tar -xvzf code-server1.1156-vsc1.33.1-linux-
x64.tar.gz && cp code-server1.1156-vsc1.33.1-linux-x64/code-
server /usr/bin/ && rm -rf code-server1.1156-vsc1.33.1-linux-
x64*
    cwd: “~"
   040-chmod-bin:
   command: chmod +x /usr/bin/code-server
     cwd: "~"
……
Step 3: Accesso Web
Parametri
- Chiavi SSH
- Configurazione Certificati
- Password di Accesso
- Domini
- Volumi
Un volume
Più volumi
workspace:/
project A
workspace:/
project B
workspace:/
project C
Diversi progetti
workspace:/
customer 1
workspace:/
customer 2
workspace:/
customer 3
Diversi clienti
small type:/
dev env
medium type:/
test env
data type:/
prod env
Diversi scopi
small type:/
dev env
medium type:/
test env
data type:/
prod env
Diversi scopi
La soluzione
API
ImplementazioneSoluzione
CoreAPIButton
ImplementazioneSoluzione
CoreAPIButton
ImplementazioneSoluzione
CoreAPIButton
API
Demo!
Questo è … SAM
……
Resources:
   API:
     Type: AWS::Serverless::Api
     Properties:
       StageName: !Ref Stage
       Auth:
         DefaultAuthorizer: AWS_IAM
         InvokeRole: NONE
  Microservice:
     Type: AWS::Serverless::Function
     Properties:
       CodeUri: MicroserviceAPI/
       Handler: index.handler
       Runtime: nodejs10.x
……
Lambda Button
def launch_stack(configuration_item):
    stackdata = None
    # fingers crossed
    try:
        # generate a `minimum_password_length` random password if not 
# defined in configuration item parameter
        configuration_item["app_password"] = "".join(
            random.choices(string.ascii_letters + string.digits, 
k=minimum_password_length)) 
            if "app_password" not in configuration_item.keys() 
            else configuration_item["app_password"]
        # map configuration item parameters to stack parameters
        parameters = list(map(lambda x: {
            "ParameterKey": f"{snake_to_camelcase(x)[0].upper()}
{snake_to_camelcase(x)[1:]}",
            "ParameterValue": configuration_item[x]
        }, configuration_item.keys()))
        response = microservice_api.create_environment(parameters)
        stackdata = response.text
    except Exception as e:
        logging.error(str(e))
    return stackdata
Lambda API
Lambda API
github.com/jeremydaly/lambda-api
const api = require('lambda-api')();
const _ = require('lodash')
const stackLib = require('./stack')
api.post('/environments', async (req, res) => {
  // Check if a body is provided
  if (req.body === undefined || req.body == “")
throw Error("No required stack parameters specified.");
  // Isolate required UserId property and throw error if not defined
  var userId = _.get(_.find(req.body, (parameter) => 
parameter.ParameterKey == "UserId"), "ParameterValue", undefined);
  if (userId === undefined || userId == “")
throw Error("No user id specified.");
  return await stackLib.createStack(userId, req.body);
})
api.delete('/environments/:environment', async (req, res) => {
  return await stackLib.deleteStack(req.params.environment);
})
api.get('/environments/:environment', async (req, res) => {
  result = await stackLib.getStack(req.params.environment);
  if (condition) res.error(404, 'Not found’);
  else return result;
})
module.exports = api
Demo
Sviluppi
Frontend per amministrazione
Chatbot & Multitenancy
github.com/made2591/fullstackconf19
Codice, materiali, slide
Guido
Nebiolo
Matteo
Madeddu
Grazie
Q & A

Contenu connexe

Similaire à The Rise of Mobility

ngServer and-collaboratived-development-between-san-francisco-and-tokyo
ngServer and-collaboratived-development-between-san-francisco-and-tokyongServer and-collaboratived-development-between-san-francisco-and-tokyo
ngServer and-collaboratived-development-between-san-francisco-and-tokyo
Satoshi Tanaka
 

Similaire à The Rise of Mobility (20)

All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnel
 
C# Powered Robots, C# Powered Mobile Apps
C# Powered Robots, C# Powered Mobile AppsC# Powered Robots, C# Powered Mobile Apps
C# Powered Robots, C# Powered Mobile Apps
 
Js foo - Sept 8 upload
Js foo - Sept 8 uploadJs foo - Sept 8 upload
Js foo - Sept 8 upload
 
Mist.io @ AWSUGGR
Mist.io @ AWSUGGRMist.io @ AWSUGGR
Mist.io @ AWSUGGR
 
DevOps meetup 16oct docker and jenkins
DevOps meetup 16oct docker and jenkinsDevOps meetup 16oct docker and jenkins
DevOps meetup 16oct docker and jenkins
 
Tdd is not about testing
Tdd is not about testingTdd is not about testing
Tdd is not about testing
 
Don't Over-React - just use Vue!
Don't Over-React - just use Vue!Don't Over-React - just use Vue!
Don't Over-React - just use Vue!
 
Docker in development (Story)
Docker in development (Story)Docker in development (Story)
Docker in development (Story)
 
Building Product from ground up using Open Source Technologies
Building Product from ground up using Open Source TechnologiesBuilding Product from ground up using Open Source Technologies
Building Product from ground up using Open Source Technologies
 
ngServer and-collaboratived-development-between-san-francisco-and-tokyo
ngServer and-collaboratived-development-between-san-francisco-and-tokyongServer and-collaboratived-development-between-san-francisco-and-tokyo
ngServer and-collaboratived-development-between-san-francisco-and-tokyo
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using Ruby
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzke
 
Full stack development in Go
Full stack development in GoFull stack development in Go
Full stack development in Go
 
Virtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On DemandVirtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On Demand
 
AngularJS preso with directives and route resolve
AngularJS preso with directives and route resolveAngularJS preso with directives and route resolve
AngularJS preso with directives and route resolve
 
O futuro do desenvolvimento .NET
O futuro do desenvolvimento .NETO futuro do desenvolvimento .NET
O futuro do desenvolvimento .NET
 
MVP Mix 2015 Leveraging MVVM on all Platforms
MVP Mix 2015  Leveraging MVVM on all PlatformsMVP Mix 2015  Leveraging MVVM on all Platforms
MVP Mix 2015 Leveraging MVVM on all Platforms
 
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
 
IoT Development from Software Developer Perspective
IoT Development from Software Developer PerspectiveIoT Development from Software Developer Perspective
IoT Development from Software Developer Perspective
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

The Rise of Mobility