GithubHelp home page GithubHelp logo

langburd / ansible-role-configdrive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jriguera/ansible-role-configdrive

0.0 0.0 0.0 41 KB

Configdrive Role for cloud-init with OpenStack Ironic

License: Apache License 2.0

Jinja 100.00%

ansible-role-configdrive's Introduction

ansible-role-configdrive

Currently this repo is not being actively maintained. I suggest you use the fork maintained by David Blaisonneau: https://gitlab.com/davidblaisonneau-orange/ansible-role-configdrive


Ansible role to create config-drives for OpenStack Ironic. It creates OpenStack config-drives data for nodes and it is able to setup complex networking configuration like bonding, vlans and bridges on Debian and RedHat based distributions. Note that the images have to have support for those features (kernel modules, packages, ...). This tool just create the configuration files which are going to be injected in the host at boot time using Cloud-Init.

This playbook is intended to be executed prior to the deployments of nodes via Ironic. It creates a basic configuration drive containing network configuration, a SSH key permitting the user to login to the host, and other files like /etc/hosts or /etc/resolv.conf. Also, it is able to include user_data file https://help.ubuntu.com/community/CloudInit

Ansible 2.0, works with Ubuntu Trusty, Xenial and Centos 7

Requirements

It does not install packages on the target host, it just creates the folders and files needed to create a config-drive volume, So, be aware that you probably you will need to install genisoimage, base64 and gzip.

Configuration

Role parameters

# You should overwrite those role variables!
# It will generate the network configuration based
# on the family!
configdrive_os_family: "Debian"
configdrive_uuid: "uuid-test-01"
configdrive_fqdn: "test.example.com"
configdrive_name: "test"
configdrive_ssh_public_key:
configdrive_availability_zone: ""
configdrive_network_info: True
configdrive_config_dir: "/var/lib/ironic/images/"
configdrive_volume_path: "/var/lib/ironic/images/"

# Aditional metadata
configdrive_meta: {}

# Path to ssh public key file
configdrive_ssh_public_key_path:
# Path to cloud-config file
configdrive_config_user_data_path:

# Automatically assigned with uuid
#configdrive_instance_dir:
# Delete the instace dir folder after creation
configdrive_config_dir_delete: False

# Populate the /etc/resolv.conf
#configdrive_resolv:
#    domain: "example.com"
#    search: "hola.example.com"
#    dns: ['8.8.8.8']

# Populate the /etc/hosts
#configdrive_hosts:
#  - ['127.0.1.1', 'host1.domain.com']
#  - ['127.0.1.2', 'host3.domain.com']

# Definition list of devices
#configdrive_network_device_list:
#  - device: "eth1"
#    bootproto: "dhcp"
#  - device: "eth2"
#    bootproto: "dhcp"
#    type: "phy"
#  - device: "eth0.500"
#    type: "vlan"
#    address: "10.1.1.10"
#    netmask: "255.255.255.0"
#    gateway: "10.1.1.1"
#    nameservers: 
#      - 8.8.8.8
#      - 9.9.9.9
#    domain: "hola.com"
#    backend: ["eth0"]

Usage

Have a look at the site.yml and type vagrant up, go to the folder /tmp/configdrive inside the vagrant vm and you will see the compresed iso volume and all the folder/files structure included in it.

Author and License Information

Copyright 2019 Jose Riguera Lopez

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ansible-role-configdrive's People

Contributors

jriguera avatar markgoddard avatar oneswig avatar jovial 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.