Coder Social home page Coder Social logo

srinathgs / calm-dsl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nutanix/calm-dsl

0.0 1.0 0.0 1.28 MB

Keep Calm and DSL On!

Home Page: https://www.nutanix.com/products/calm

License: Apache License 2.0

Dockerfile 0.27% Makefile 0.30% Python 89.71% HTML 9.67% Shell 0.06%

calm-dsl's Introduction

calm-dsl

Getting Started

  • Setup: calm init dsl. Please fill in the right values.
  • Server status: calm get server status.
  • Config: calm show config. Check if you have the right config. By default, config is stored at ~/.calm/config.ini. Please see calm set config --help for details to update config.
  • First blueprint: calm init bp. This will create a folder HelloBlueprint with all the necessary files. HelloBlueprint/blueprint.py is the main blueprint DSL file. Please read the comments in the beginning of the file for more details about the blueprint.
  • Compile blueprint: calm compile bp --file HelloBlueprint/blueprint.py. This command will print the compiled blueprint JSON.
  • Create blueprint on Calm Server: calm create bp --file HelloBlueprint/blueprint.py --name <blueprint_name>. Please use a unique name for <blueprint_name>.
  • List blueprints: calm get bps. You can also pass in filters like calm get bps --name <blueprint_name> and so on. Please look at calm get bps --help.
  • Describe blueprint: calm describe bp <blueprint_name>. It will print a summary of the blueprint.
  • Launch blueprint to create Application: calm launch bp <blueprint_name> --app_name <app_name> -i
  • List apps: calm get apps.
  • Describe app: calm describe app <app_name>. It will print a summary of the application and the current application state.
  • Delete app: calm delete app <app_name>. Hint: You can delete multiple apps using: calm get apps -q | xargs -I {} calm delete app {}.

Dev Setup

MacOS:

  • Install homebrew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)".
  • Install python3, git and openssl: brew install git python3 openssl.
  • Add path to flags: export LDFLAGS="-L$(brew --prefix openssl)/lib" & export CFLAGS="-I$(brew --prefix openssl)/include".
  • Clone this repo and run: make dev from top directory.
  • Getting into virtualenv: source venv/bin/activate.
  • Getting out of virtualenv: deactivate.

Centos:

  • make _init_centos to setup your CentOS 7 VM for development. This will install python3 and docker.

Use:

  • make dev to create/use python3 virtualenv in $TOPDIR/venv and setup dev environment. Activate it by calling source venv/bin/activate. Use deactivate to deactivate virtualenv.
  • make test to run quick tests. make test-all to run all tests.
  • make dist to generate a calm.dsl python distribution.
  • make docker to build docker container. (Assumes docker client is setup on your machine)
  • make run to run container.
  • make clean to reset.

Code formatted by Code style: black

calm-dsl's People

Contributors

aadis avatar abhijeetkaurav1st avatar michaelhaigh avatar mkeating avatar saratkumar-yb avatar suryadhulipudi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.