Getting Started with
      CloudScript
Nick Peterson, Director of Engineering
Our Story
Hosting industry veterans each averaging 8+ years of
managed hosting & cloud infrastructure experience

Making infrastructure easy to deploy and manage for
Developers, DevOps, and Operations folks alike

Providing robust Infrastructure as a Service for high
performance cloud computing applications since 2010
What is CloudScript?
CloudScript is a Domain Specific Language
(DSL) for orchestrating application infrastructure.
● External DSL syntax like Make
  or Ant
● Engine has Threads, Tasks,
  Agents
● Resources include, Keys,
  Scripts, Recipes, Servers,
  Storage Objects, Networks
● Methods include, Create,
  Read-Or-Create, Delete
● Embedded language support
  includes, Puppet, Chef, Shell,
  Python, Ruby, etc.
Design Principles
1. Dependency based programming model
   allows programmers to specify prerequisites
2. Idempotent methods on all resource types
   allows repetition w/o side effects to reach the
   desired outcome for your environment
3. Code enveloping increases the power without
   reducing the expressivity of the DSL
4. Distributed agents and centralized event
   processing allow for software pipelines
Hello World!
cloudscript apache_web_server
 version = _LATEST                           /server/cloud web_server read_or_create
 result_template = apache_result_template      hostname = 'helloworld'
                                               image = 'Linux Ubuntu 12.04 LTS 64-bit'
globals                                        service_type = 'CS01'
 server_pass = lib::random_password()          keys = [server_key, console_key]
 console_pass = lib::random_password()         recipes = [web_server_template]

thread provision_web_server                 text_template web_server_template
                                            #!/bin/sh
 tasks = [configure_web_server]             apt-get update; apt-get -y install apache2
                                            /etc/init.d/apache2 start
task configure_web_server                   cat <<EOF>/var/www/index.html
                                            Hello World!
 /key/password server_key read_or_create    EOF
   key_group    = _SERVER                   exit 0
   password     = server_pass               _eof

 /key/password console_key read_or_create   text_template apache_result_template
   key_group    = _CONSOLE                  Your web page is located at:
   password     = console_pass              http://{{ web_server.ipaddress_public }}
                                            _eof
Use Cases

● Application Stacks
● Distributed Systems/Clusters
● Environmental Version Control
● Environmental Scaling Up/Down
● Business Process Automation
● Data Pipeline Automation
@NephoScale
http://www.nephoscale.com
   info@nephoscale.com
        855-637-4679
      +1-408-599-7008

Getting Started with CloudScript

  • 1.
    Getting Started with CloudScript Nick Peterson, Director of Engineering
  • 2.
    Our Story Hosting industryveterans each averaging 8+ years of managed hosting & cloud infrastructure experience Making infrastructure easy to deploy and manage for Developers, DevOps, and Operations folks alike Providing robust Infrastructure as a Service for high performance cloud computing applications since 2010
  • 3.
    What is CloudScript? CloudScriptis a Domain Specific Language (DSL) for orchestrating application infrastructure. ● External DSL syntax like Make or Ant ● Engine has Threads, Tasks, Agents ● Resources include, Keys, Scripts, Recipes, Servers, Storage Objects, Networks ● Methods include, Create, Read-Or-Create, Delete ● Embedded language support includes, Puppet, Chef, Shell, Python, Ruby, etc.
  • 4.
    Design Principles 1. Dependencybased programming model allows programmers to specify prerequisites 2. Idempotent methods on all resource types allows repetition w/o side effects to reach the desired outcome for your environment 3. Code enveloping increases the power without reducing the expressivity of the DSL 4. Distributed agents and centralized event processing allow for software pipelines
  • 5.
    Hello World! cloudscript apache_web_server version = _LATEST /server/cloud web_server read_or_create result_template = apache_result_template hostname = 'helloworld' image = 'Linux Ubuntu 12.04 LTS 64-bit' globals service_type = 'CS01' server_pass = lib::random_password() keys = [server_key, console_key] console_pass = lib::random_password() recipes = [web_server_template] thread provision_web_server text_template web_server_template #!/bin/sh tasks = [configure_web_server] apt-get update; apt-get -y install apache2 /etc/init.d/apache2 start task configure_web_server cat <<EOF>/var/www/index.html Hello World! /key/password server_key read_or_create EOF key_group = _SERVER exit 0 password = server_pass _eof /key/password console_key read_or_create text_template apache_result_template key_group = _CONSOLE Your web page is located at: password = console_pass http://{{ web_server.ipaddress_public }} _eof
  • 6.
    Use Cases ● ApplicationStacks ● Distributed Systems/Clusters ● Environmental Version Control ● Environmental Scaling Up/Down ● Business Process Automation ● Data Pipeline Automation
  • 7.