Overview

Autopilot is by far the most sophisticated module in Flockport. Its is designed to do a lot and do it simply.

Autopilot lets you use yaml files to build and deploy containers and supporting infrastructure. All Flockport functionality is available for use in Autopilot.

You can automate everything from adding servers, building and deploying containers across servers to deploying sophisticated networks, distributed storage, service discovery, load balancers, databases and more.

It encapsulates Flockport and delivers a whole new level of flexibility.

Like the scheduler this is an early preview release and while all the functionality works it still in testing and only the container build and deploy module is ready for use.

So we are limiting it to building and deploying containers and will make the other functionality available as it gets ready for end user use.

Containers

You can use autopilot to build and deploy containers across servers with ease.

Autopilot uses standard yaml. You define your container and then simply run the Flockport deploy command.

Below is the standard autpilot definition to build containers.

builds:
 wordpress491
  baseimage: php71n
  run: /build/wordpress.sh
  volumes:
    - wordpress
    - /var/www/wordpress/uploads
  ports:
    - 80
  ip:
    - 10.0.4.10
  add:
    - /tmp/wordpress.conf /etc/nginx/sites-available/wordpress
  db:
    mysql-latest:
    - wordpress
    - wordpress
    - 10.0.4.0/24
  - pubapp
    - mywordpress.org:80
        

You can build and deploy multiple containers with a single file. All containers to be built must be placed under 'builds' in the file with the 'name' of the container to be built.

'baseimage' specifies the baseimage to build a container from. It could a bare OS container or an app container.

'run' specifies the script to run to build the container. This will typically be used to install applications and setup and configure the container for use.

The rest of the commands are optional

'add' specifies any files or folders to be copied to the container.

'ports' specifies any ports that should be forwarded when the container is run. Multiple ports can be specified.

'volumes' specifies volumes or folders to be attached to the container. Multiple volumes can be specified. Volumes must must be created beforehand so they can be found and attached during the build. Folders from the host can be specified and they will be attached on build.

'ip' specifies a static IP for the container. If specified the container will be configured with the specified static ip

'tags' specify any tags to be added to the container.

'db' specifies any companion DB to be created and linked to the container. You can specify a dbname and dbuser and it will be created on build and linked to the container.

You can also use autopilot to deploy containers to servers.

Below if a standard autopilot definition to deploy containers across servers. The servers must already be a part of the Flockport cluster.

Autpilot already supports provisioning servers but the functionality is still under testing. When done you will be able to provision servers and configure them.

images:
  alpine34:
    hosts:
    - jessie
    - alpine
    network: fx0
    ports:
    - 443
    volumes:
    - mvol
    service:
      name: alpine34
      address: 3000
      check:
        layer: http
        address: alpine34.consul:3000
  wordpress491:
    hosts:
    - trusty
    - xenial
    network: fvx0
    ports:
    - 80
    volumes:
    - wordpress