Coder Social home page Coder Social logo

heat-template's Introduction

heat-template

A. vm_net_router.yaml
Create a private network, router, and two instances named Server-01, Server-02.
For Server-01:

  1. Setup proxy
  2. Install docker
  3. Install python-dev, python-pip and python-heatclient. The purpose is to create a heat client environment.
  4. Create openrc for Openstack environemnt setting. It will be used for heat client.
  5. Install nsenter. The purpose is to enter container (docker) .
  6. Install pipework for docker network utilization.

After the package installation and setting, you can do the docker programming and testing. Besides, you can run heat template in the VM.

$ heat stack-create stack_name -f vm_net_router.yaml

B. two_vm_net_sh.yaml
Create two instances using the original private network, router, but using "get_file: script/init_script.sh" in user_data for server-01.
The advantage of this case is to leverage the traditional shell script.

$ heat stack-create stack_name -f two_vm_net_sh.yaml

C. heat_3a.yaml
Using nested template, Simply create a resource that has its type set to the YAML file of the sub-template. If we assume that there is a template called lib/mysql.yaml at our disposal that creates a MySQL server, then this is how a master template can invoke it:
If you want to see these templates, please go ahead and take a look at them in my GitHub repository. Here are lib/mysql.yaml and lib/wordpress.yaml.

$ heat stack-create stack_name -f heat_3a.yaml

D. heat_4a.yaml
Using heat environment, the heat command line client is pretty smart, it finds all the nested template references in the master template and then uploads all the needed files to Heat as a package.
But Horizon does not have the ability to do that, any templates that reference other templates, cannot be launched from the web dashboard. An alternative way to nest templates called environments, which Horizon supports. An environment file is a YAML file that has global definitions that are imported before a template is parsed. (See lib/env.yaml)
To download heat_4a.yaml and lib/env.yaml, and load both in Horizon's launch stack dialog.

$ heat stack-create stack_name -f heat_4a.yaml -e lib/env.yaml

heat-template's People

Contributors

riverhsieh avatar

Watchers

 avatar  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.