Giter Club home page Giter Club logo

customimage_packer's Introduction

Custom Image mit Packer

Voraussetzungen

In der Buildumgebung bspw. lokale Workstation muss Packer installiert und ausführbar sein. Für das Abspielen des Ansible Playbooks (provisioners_shell-ansible.json) muss neben Packer auch Ansible auf dem System vorhanden sein. Außerdem muss die Buildumgebung über einen Internetanschluss verfügen welcher ausgehend SSH-Verbindungen zulassen.

Anpassungen

In der Datei vars.json müssen folgende Variable angepasst werden:

  • username = pluscloud open Benutzer
  • password = pluscloud open Benutzerkennwort
  • tenant_id = pluscloud open Projekt ID

alle anderen Variablen sind bereits vorkonfiguriert um in der pluscloud open ein Custom-Image zu erzeugen.

Erzeugen eines Custom Images

Es gibt zwei Beispieldateien

  • provisioners_shell-ansible.json
  • provisioners_shell.json

Beide Beispiele erzeugen ein Custom-Image mit einem Webserver, bei provisioners_shell-ansible.json werden zusätzlich noch SSH-Keys über anisble im Image hinterlegt. In der Datei ./ansible/roles/install_ssh-keys/tasks/upload_pubkeys.yml können ab Zeile 9 eigene SSH Keys hinterlegt werden. Die Public SSH-Keys müssen in ./ansible/roles/install_ssh-keys/files/ abgelegt werden. Die Keys werden im Image für den Benutzer centos hinterlegt.

Durch Aufruf von:

packer build -var-file=vars.json provisioners_shell-ansible.json 

oder

packer build -var-file=vars.json provisioners_shell.json 

wird jeweils ein Image erzeugt und im openstack Projekt der HCI abgelegt.

Links

customimage_packer's People

Contributors

mhammps avatar

Watchers

 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.