Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stackstorm/packer-st2

Packer templates for building & deploying Vagrant & OVA with StackStorm installed
https://github.com/stackstorm/packer-st2

inspec ova packer-template st2 stackstorm vagrant vagrant-boxes virtual-appliance virtualbox

Last synced: about 2 months ago
JSON representation

Packer templates for building & deploying Vagrant & OVA with StackStorm installed

Awesome Lists containing this project

README

        

# StackStorm Vagrant & OVA

[![Latest Build](https://github.com/StackStorm/packer-st2/actions/workflows/packer-build.yml/badge.svg?branch=master)](https://github.com/StackStorm/packer-st2/actions/workflows/packer-build.yml)
[![Latest Release](https://img.shields.io/github/release/StackStorm/packer-st2/all.svg)](https://github.com/StackStorm/packer-st2/releases)
[![Download from Vagrant Cloud](https://img.shields.io/badge/Vagrant-cloud%20%E2%86%92-1563ff.svg)](https://app.vagrantup.com/stackstorm/boxes/st2/)

[Packer](https://www.packer.io/intro/index.html) templates with [InSpec](https://www.inspec.io/) integration tests for building Vagrant box & OVA image with [StackStorm](https://github.com/stackstorm/st2) community installed.
Fully tested and packaged artifacts are produced during the build pipeline.

## Usage
### Vagrant Quick Start
Starting a Vagrant VM is easy:
```
vagrant init stackstorm/st2
vagrant up
vagrant ssh
```

### Updating the Vagrant box
Once we release a newer version, Vagrant will warn you about the available update. To update the box:
```
vagrant box outdated
vagrant box remove stackstorm/st2
vagrant up
```

### OVA Virtual Appliance
Virtual appliance is available for download as `.OVA` image from the [Github Releases](https://github.com/StackStorm/packer-st2/releases) page.

> _Linux login credentials:_

> Username: `vagrant`

> Password: `vagrant`
>
> _StackStorm login details:_

> Username: `st2admin`

> Password: `Ch@ngeMe`

At the moment only Virtualbox provider is supported. VMWare-compatible virtual appliance is available with [StackStorm Enterprise (EWC)](https://stackstorm.com/#product) image. Ask [StackStorm Support](mailto:[email protected]) for more info.

### `st2-integration-tests`
Sometimes StackStorm does not run properly for some reason.

Discovering why at a infra level is the responsibility of `st2-integration-tests` which will perform StackStorm InSpec Tests and report back with more detailed info.

This can save time for both user & engineering team to avoid extensive troubleshooting steps.

If something went wrong, - just run `st2-integration-tests`!

## Building Vagrant & OVA
### Requirements
The following tools are required for the build process:
- Virtualbox - https://www.virtualbox.org/wiki/Downloads
- Packer - https://www.packer.io/downloads.html (`make install-packer`)

### Build Steps
* Run Packer via `make build`

The Packer build process will import `Ubuntu 18.04 Bionic Server` iso image in Virtualbox, bootstrap Ubuntu server with all the required settings (automating typical iso live CD install steps),
install & configure StackStorm and finally export both the Vagrant box and .OVA image into the [`/builds`](/builds) directory.
> See [`st2.json`](/st2.json) which codifies Packer build pipeline and could be used as a source of entire automation logic.

### Build params
There are environment variables you can pass to control the StackStorm version and box/image version.
- `ST2_VERSION` - `x.y.z` format, like `2.7.1` (default: latest st2 version)
- `BOX_VERSION` - `YYYYMMDD` format, like `20180131` (default: today's date in UTC)

As a result, Packer will generate the box with version `v2.7.1-20180131`.

## Testing
[`/test`](/test) directory contains Integration tests, powered by [InSpec.io](https://www.inspec.io/) Infrastructure Testing framework.
Tests are performed at the end of the Packer build pipeline after entire installation and configuration. They ensure that custom OS Linux-level modifications are in place and StackStorm was really deployed, works correctly and alive with other services it relies on like RabbitMQ, MongoDB.
To make testing close to a real-world scenario, an additional VM reboot step in the build pipeline is performed before running the actual integration tests.

> Please don't forget to include respective tests for every new critical feature of the system!

> See https://www.inspec.io/docs/reference/dsl_inspec/ and existing `/tests` examples which makes easy to add more tests.