yac - your automated cloud


Requirements

  1. Docker engine
  2. A linux shell (e.g. mac term or cygwin)

What is yac?

A workflow system that does for services what docker does for applications.

Docker helped make it easy to find, run, define, and share individual applications.

yac does the same for services via the Servicefile.

Servicefile is to yac what a Dockerfile is to docker

What is a Service?

An application that provides some useful function.

An application that can be implemented using the native constructs of Nordstrom cloud providers, i.e.:

  • Kubernetes resources (AWS or GKE clusters)
  • AWS cloud formation

support for GCE via cloud manager coming soon!

yac Modes

Pipeline Mode

Say your operate the artifactory service.

Say artifactory is implemented in kubernetes.

You can deploy the artifactory service as follows:

$ yac deploy artifactory.json

artifactory.json is the artifactory Servicefile

The yac deploy command does the following:

  • builds all container images used in the artifactory service
  • builds the dev env in one or more kubernetes clusters
  • runs artillery-based tests against the dev env
  • builds the staging env in kubernetes
  • re-runs tests against the staging env
  • builds the prod env in kubernetes
  • re-runs tests against the prod env

Ala Cart Mode

Alternatively, you can use yac in ala carte mode to execute individual operations within each stage of your pipeline.

# build artifactory containers
$ yac make artifactory.json

# build the artifactory dev env to the non-prod cluster
$ yac stack artifactory.json --kvps=env:dev

# run integration tests against the artifactory dev env
$ yac test artifactory.json --kvps=env:dev

# run a recurring DB maintenance task against the artifactory prod env
$ yac task artifactory.json remove-inactive-users --kvps=env:prod

Getting Started

Quick Start

Install the yac  cli as:

$ source /dev/stdin <<< "$(curl --header "PRIVATE-TOKEN: sAd7ckLs4VkdaMxH8oC2" "https://gitlab.nordstrom.com/api/v4/projects/288/repository/files/.yac/raw?ref=master")" 

This installs yac as a shell function in your current shell session.

Type yac for help and to verify the version installed.

Run a specific version of yac by exporting the YACVER environment variable and THEN running the 'source ...' command above, e.g.:

$ export YACVER=2.1.2 && source /dev/stdin <<< "$(curl --header ...

Full Start

Read the following sections:

Familiarize yourself with the yac cli and with Servicefiles via the yac grok command