January 18, 2016
Vessels are computing units that allow you to run services within your project. Think of vessels as lightweight virtual machines that run independent of the host operating system. Vessels are made possible by Linux container, which the vessels use as their concious state.
Due to their complete isolation of processes, vessels allow you to run just about any software supported by the operating system. Be it a database server, a mail server or even a load balancing software vessels have you covered. They allow you to run your application in a multi-service setup, allowing for greater scalability at a later stage.
Vessels reside inside the project and can be created from all Spacedecode interfaces (refer to the getting started guide for more information). From the workspace, vessels can be identified by the
.vsl file extension. Their distinct features are the
vessel.yml file used for configuration and the
rootfs/ folder that stores filesystem changes.
The vessel.yml file
This file is in a YAML file format and includes some prepopulated fields by default. The default file may look something like this:
# The vessel's unique local ID id: 31d96334a9184c2990aa51fb0b5f398f # The name of the vessels as named during it's creation name: webserver # The project that the vessel belongs to project: sithembiso/helloworld # The recipe on which the vessel is based (concept explained below) recipe: sithembiso/nginx # Timestamp at the time the vessel was created created: 2016-02-18T11:56:32.966239496+02:00 # Some runtime settings: runtime: # Whether or not the vessel should automatically bootup # either when the daemon starts, or when it gets downloaded into a new machine. auto_start: false # Process configuration # By default, the vessel will inherit processes from the recipes that back it. # Setting ignore_recipe_processes to true prevents it from doing so. ignore_recipe_processes: false # An array of processes processes: - # The vessel needs at least one process to keep it running. This property # means that it will stop when this process exits. NB: There can only be one # main process. main: true # The actual command to run. Make sure it runs in the foreground cmd: nginx -q -c /etc/nginx/nginx.conf # The environment variables required by the vessel at runtime. env: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin; # Current working directory cwd: /usr/share/nginx/ # This property means that the vessel should ignore the volumes defined in ancestor recipes. ignore_recipe_volumes: false