Giter Site home page Giter Site logo

nevermin / debian-cloud-images Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awsmarketplace/debian-cloud-images

0.0 2.0 0.0 531 KB

mirror form: https://salsa.debian.org/cloud-team/debian-cloud-images.git

License: GNU General Public License v2.0

Makefile 0.35% Shell 7.41% Python 92.24%

debian-cloud-images's Introduction

FAI Cloud image builder

This repository aims to build Debian images for all cloud providers

Getting started

You will need a checkout of this repository on your disk and a recent fai-server package (at least 5.7) installed. Install the necessary fai packages without the recommends (which avoids turning your host into a DHCP server!). You also need python3-libcloud from Buster or newer.

  # git clone https://salsa.debian.org/cloud-team/debian-cloud-images.git
  # sudo apt install --no-install-recommends ca-certificates debsums dosfstools \
    fai-server fai-setup-storage make python3 python3-libcloud python3-marshmallow \
    python3-pytest python3-yaml qemu-utils udev

Call make help and follow the instructions

Example 1:

   # make image-stretch-nocloud-amd64

This will create some log output and the following files:

  • image-stretch-nocloud-amd64.build.json
  • image-stretch-nocloud-amd64.info
  • image-stretch-nocloud-amd64.raw
  • image-stretch-nocloud-amd64.raw.tar

Example 2:

    # make image-buster-genericcloud-amd64
  • image-buster-genericcloud-amd64.build.json
  • image-buster-genericcloud-amd64.info
  • image-buster-genericcloud-amd64.raw
  • image-buster-genericcloud-amd64.tar

These images can be used with QEMU-KVM, Virtualbox or any other virtualization backend that support raw disk images.

You can login as root on the VM console without a password (but not over SSH), and there are no other users. You can add new users using adduser as usual, and you probably want to add them to the sudo group.

After the disk image is created you can try it with kvm, and wait 5s for the boot sequence to start:

    # kvm -nic user,model=virtio -m 1024 -drive format=raw,file=image-buster-genericcloud-amd64.raw

Supported image types

As shown above, various types of images can be built for different use cases. Each type of image can be built with the following command:

    # make <suite>-image-<type>

where <suite> is one of stretch, buster, or sid. <type> can be any of the following:

  • azure: Optimized for Microsoft's cloud computing platform Azure
  • ec2: Optimized for the Amazon Elastic Compute Cloud (EC2)
  • gce: Optimized for the Google Cloud Engine
  • generic: Should run in any environment
  • genericcloud: Should run in any virtualised environment. Is smaller than generic by excluding drivers for physical hardware.
  • nocloud: Mostly useful for testing the build process itself. Doesn't have cloud-init installed, but instead allows root login without a password.

Documentation

New cloud vendor how-to

First of all, we are pretty confident that generic-vm-image should boot mostly everywhere. If you really need adjustments for your image, start looking at the directory structure and only drop in adjustments where really required. Our CLOUD (base) class should already take care of the most of what is needed for a cloud image.

Uploader

Uploaders typically need some variables set with credentials or targets.

  • $CLOUD_UPLOAD_DEV_CONFIG: File variable containing a config file.

Amazon EC2

  • $CLOUD_UPLOAD_EC2_DEV_ENABLED: Set to 1 to upload and create images during development.
  • $AWS_ACCESS_KEY_ID
  • $AWS_SECRET_ACCESS_KEY
---
ec2:
  image:
    regions:
    - REGION
    tags:
    - TAG=VALUE
  storage:
    name: BUCKET

Google Compute Engine

  • $GOOGLE_APPLICATION_CREDENTIALS: File variable containing service account credentials.
  • $CLOUD_UPLOAD_GCE_DEV_ENABLED: Set to 1 to upload and create images during development.

Config file example

---
gce:
  image:
    project: project
  storage:
    name: NAME

Microsoft Azure

  • $CLOUD_UPLOAD_AZURE_DEV_ENABLED: Set to 1 to upload images during development.

Config file example

---
azure:
  auth:
    client: OBJECT
    secret: SECRET
  image:
    tenant: TENANT
    subscription: SUBSCRIPTION
    group: GROUP
  storage:
    tenant: TENANT
    subscription: SUBSCRIPTION
    group: GROUP
    name: NAME

debian-cloud-images's People

Contributors

adriaaah avatar hartmans avatar jkaplowitz avatar kritzefitz avatar mrfai avatar nbraud avatar nevermin avatar nmeyerhans avatar rvandegrift avatar sdelafond avatar thomasgoirand avatar vorlock avatar zmarano avatar zobelhelas avatar

Watchers

 avatar  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.