Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Latest commit

 

History

History
42 lines (29 loc) · 1.29 KB

quick-start.md

File metadata and controls

42 lines (29 loc) · 1.29 KB

Quick Start

Suppose, your boss assigns you a task to deploy a software product called foobar.

  1. Firstly, you should get the operation code (installation script) of product, and prepare some servers.

    # use the examples of this project to get started.
    sail-examples/products/foobar/
    
    # suppose you put the sail-examples at your home dir
    $ ls ~/sail-examples/products/foobar/
    
    $ cd ~/sail-examples
    $ mkdir targets
    $ mkdir packages
    
    
    # create a ~/.sailrc.yaml to set global options, or else
    # you have to explicitly specify these options everytime when running sail command.
    $ vim ~/.sailrc.yaml
    products-dir: /path/to/home/dir/sail-examples/products
    targets-dir: /path/to/home/dir/sail-examples/targets
    packages-dir: /path/to/home/dir/sail-examples/packages
    
    
    # place the sail exectuable binary file to some place.
    # like /usr/bin/sail or any place, and chmod it with executable permission.
  2. Create a environment (target/zone) and specify the product to be deployed.

    # the target and zone name can be any string
    $ ./sail conf-create --target myfoobarapp --zone default --product foobar --hosts 10.0.0.1
  3. Now start to deploy

    $ ./sail apply --target myfoobarapp --zone default