Coder Social home page Coder Social logo

trove-guest-image-elements's Introduction

Image elements for building Trove guest images

Building prerequisites

Ubuntu Distro: Each image for datastore should include next mandatory elements:

${DISTRO}-${DATASTORE}-guest-image (for example ubuntu-mysql-guest-image, ubuntu-cassandra-guest-image, etc.)

RHEL & CentOS: Each image for datastore should include next mandatory elements:

${DISTRO}-${DATASTORE}-guest-image (for example rhel-mysql-guest-image, rhel-mongodb-guest-image, etc.)

Instructions

Checkout this source tree and also the diskimage builder, export an ELEMENTS\PATH to add elements from this tree, and build any disk images you need.

sudo apt-get install qemu-utils python-virtualenv -qy
virtualenv .venv
source .venv/bin/activate
pip install dib-utils pyyaml
pip install git+https://github.com/openstack/diskimage-builder.git
git clone https://github.com/openstack/tripleo-image-elements.git
git clone https://github.com/denismakogon/trove-guest-image-elements.git
export ELEMENTS_PATH=tripleo-image-elements/elements:trove-guest-image-elements/elements:diskimage-builder/elements

Building images

To build an image please run this commands:

Ubuntu:
    export DISTRO=ubuntu
    export DIB_RELEASE=trusty

CentOS:
    export DISTRO=centos
    export DIB_RELEASE=GenericCloud
    export DIB_EXTLINUX=1

For Development purposes only:

export DIB_DEV_USER_USERNAME=ks
export DIB_DEV_USER_PASSWORD=w8EmsJXTMaG0e97NK8lM
export DIB_DEV_USER_SHELL=/bin/bash
export DIB_DEV_USER_PWDLESS_SUDO=true
export DIB_DEV_USER_AUTHORIZED_KEYS=/home/sa709c/.ssh/authorized_keys    

For Trove Guest agent config:

export DIB_TROVE_RABBITMQ_HOSTS=172.24.4.18:5672
export DIB_TROVE_RABBIT_USERID=guest
export DIB_TROVE_RABBIT_PASSWORD=guest
export DIB_TROVE_RABBIT_USE_SSL=false
export DIB_TROVE_AUTH_URL=http://172.24.8.18:35357/v2.0
export DIB_TROVE_NOVA_PROXY_ADMIN_USER=nova
export DIB_TROVE_NOVA_PROXY_ADMIN_PASS=devstack
export DIB_TROVE_NOVA_PROXY_ADMIN_TENANT_NAME=service
export DIB_TROVE_SWIFT_URL=http://172.24.8.18:8080/v1/AUTH_
export DIB_TROVE_SWIFT_SERVICE_TYPE=object-store
export DIB_TROVE_BACKUP_SWIFT_CONTAINER=database_backups

disk-image-create -a amd64 \
    -o ${DISTRO}-${DATASTORE}-${DATASTORE_VERSION}-guest-image \
    -x --qemu-img-options compat=0.10 \
    ${DISTRO}-${DATASTORE}-guest-image

Note. Only anonymous HTTP(S) accessable Git repos are allowed.

For example:

    Cassandra datastore:

        export DATASTORE="cassandra"
        export DATASTORE_VERSION="2.1.1"

If DATASTORE VERSION wasn't mentioned each datastore image element would use its own default version.
For example:

    PostgreSQL datastore:

        export DATASTORE="postgresql"
        default datastore version 9.3 would be picked

If you want to build image for development purposes please add next elements into disk-image-create command:

openssh-server

If you want to build image for vCenter please add next elements:

${DISTRO}-vmware-tools

Note: this elements are orientied to work with Debian/Ubuntu 14.04 Trusty Tahr, CentOS 7.x

RHEL without the script

To build an image without the script, make sure you have diskimage-builder installed (yum install -y diskimage-builder) and run the following commands:

# RHEL related required env
export REG_METHOD=portal
export REG_USER=<user>
export REG_PASSWORD=<password>
export REG_MACHINE_NAME=trove
export REG_POOL_ID=<pool>

# DIB related required env
export DISTRO=<distro>
export DATASTORE=<datastore>
export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive"
disk-image-create -a amd64 \
    -o ${DISTRO}-${DATASTORE}-guest-image \
    -x --qemu-img-options compat=0.10 \
    ${DISTRO}-${DATASTORE}-guest-image

Note. Only anonymous HTTP(S) accessable Git repos are allowed.

RHEL with the script

Simply run 'sudo ./create-trove-image.sh -h' to see run instructions.

Based on

https://github.com/denismakogon/trove-guest-image-elements

https://github.com/vkmc/trove-image-elements

trove-guest-image-elements's People

Contributors

shaikapsar avatar denismakogon avatar iberezovskiy avatar

Stargazers

Fan Zhang avatar

Watchers

huntxu avatar James Cloos avatar mathslinux avatar  avatar May avatar blkart avatar CoffeeChou avatar daemon avatar Farice avatar Liu Yang 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.