Coder Social home page Coder Social logo

azimuth-images's Introduction

azimuth-images

This repository contains Packer template definitions for building images for use with Azimuth.

The templates work by provisioning machines in an OpenStack project and configuring them using Ansible before converting to an image. These images are then downloaded from OpenStack and uploaded to S3 for distribution in an Azimuth release.

Building an image manually

Before building an image, you must configure OpenStack authentication, using either an RC file or clouds.yaml, e.g.:

export OS_CLOUD=openstack

This repository has a concept of "environments", allowing builds to be customised for different clouds if required, for example in a fork. These manifest as directories under env, where environment are set that in turn can specify Packer var files under var.

Currently, the repository contains a base environment with cloud-agnostic configuration and an arcus environment that contains configuration for the continuous integration environment, which is kindly hosted on the Arcus cloud at the University of Cambridge.

To build images manually, outside of CI, first ensure you have Packer installed and the required providers installed:

packer init ./config.pkr.hcl

Next, create a Python virtual environment to use and install the Python and Ansible dependencies:

python -m venv .venv
source .venv/bin/activate

pip install -r ./requirements.txt

ansible-galaxy install -f -r requirements.yml

Finally, set up an environment using the arcus environment for inspiration.

You can then build images using the ./bin/build-image script. This script expects the following environment variables to be set:

  • ENVIRONMENT - the environment to use
  • PACKER_TEMPLATE - the Packer template in packer to use
  • ENV_VAR_FILES - the environment variable files to include

The values for PACKER_TEMPLATE and ENV_VAR_FILES can be determined by looking at the defined builds.

For example, to build a workstation image, the following command can be used:

ENVIRONMENT=myenv \
PACKER_TEMPLATE=linux-desktop \
ENV_VAR_FILES=common,kvm,linux,ubuntu-jammy \
./bin/build-image

This will result in a private image being built in the target OpenStack project.

azimuth-images's People

Contributors

mkjpryor avatar azimuth-ci-bot[bot] avatar m-bull avatar assumptionsandg avatar sd109 avatar johngarbutt avatar sjpb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.