Release 1.25.2
-----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJYV1yqAAoJEBty/58O8cX8hLwIAKP66w6MdPN8PDgUOteui/Sx N0UFKJ9yR4GQOAP0NffPLjch5/g0iJLs3eFKOhtGC1LjbDjpVgjX8vW18ib8wBZK GemOZPF3uxg8FROrZF1vpoDy/cHgL1YV10hCnwdjN/r9rb8zOuSabqjW+Dennj2n fZ0SJfa8Owfudn3YxGuOymVb/wMtEloDmVGBEI1Y+h7osELCCDi3OXmwsA8qMsdl cTwbeugBs4PlOVbZUK/JKGuwIHKgPnDYzYu5KpXw77/MdjGT0fo5Tlq5AOBDI2sC 9JOFEBDli4Ro05VwvI58ADMpvvOax+9EvOhLbB1dRPdZl21Iyb6gOdy2PUbFO0c= =aKxq -----END PGP SIGNATURE----- Merge tag '1.25.2' into merge-branch Release 1.25.2 Change-Id: I698bcf2e82117bd81649cd065a7af5cac85990c7
This commit is contained in:
commit
bfca36c772
15
bin/dib-lint
15
bin/dib-lint
@ -158,11 +158,24 @@ for i in $(find $ELEMENTS_DIR -type f \
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check that environment files don't "set -x"
|
# check that environment files don't "set -x" and they have no executable
|
||||||
|
# bits set
|
||||||
if [[ "$i" =~ (environment.d) ]]; then
|
if [[ "$i" =~ (environment.d) ]]; then
|
||||||
if grep -q "set -x" $i; then
|
if grep -q "set -x" $i; then
|
||||||
error "Environment file $i should not set tracing"
|
error "Environment file $i should not set tracing"
|
||||||
fi
|
fi
|
||||||
|
if [[ -x $i ]]; then
|
||||||
|
error "Environment file $i should not be marked as executable"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check for
|
||||||
|
# export FOO=$(bar)
|
||||||
|
# calls. These are dangerous, because the export hides the return
|
||||||
|
# code of the $(bar) call. Split this into 2 lines and -e will
|
||||||
|
# fail on the assignment
|
||||||
|
if grep -q 'export .*\$(' $i; then
|
||||||
|
error "Split export and assignments in $i"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check that sudo calls in phases run outside the chroot look
|
# check that sudo calls in phases run outside the chroot look
|
||||||
|
@ -1 +1,2 @@
|
|||||||
export DIB_APT_SOURCES=$(mktemp)
|
DIB_APT_SOURCES=$(mktemp)
|
||||||
|
export DIB_APT_SOURCES
|
||||||
|
0
diskimage_builder/elements/centos/environment.d/00-bootloader.bash
Executable file → Normal file
0
diskimage_builder/elements/centos/environment.d/00-bootloader.bash
Executable file → Normal file
@ -6,3 +6,12 @@ Install's and enables cloud-init for systems that don't come with it
|
|||||||
pre-installed
|
pre-installed
|
||||||
|
|
||||||
Currently only supports Gentoo.
|
Currently only supports Gentoo.
|
||||||
|
|
||||||
|
Environment Variables
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
DIB_CLOUD_INIT_ALLOW_PASS_AUTH
|
||||||
|
:Required: No
|
||||||
|
:Default: password authentication disabled when cloud-init installed
|
||||||
|
:Description: customize cloud-init to allow ssh password
|
||||||
|
authentication.
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
# Set cloud-init to allow password authentication
|
||||||
|
if [ -n "${DIB_CLOUD_INIT_ALLOW_SSH_PWAUTH:-}" ]; then
|
||||||
|
if [ -f "/etc/cloud/cloud.cfg" ]; then
|
||||||
|
if [ -z "$(cat /etc/cloud/cloud.cfg | grep ssh_pwauth)" ]; then
|
||||||
|
echo "ssh_pwauth not exist. append to EOF"
|
||||||
|
sudo sh -c 'echo "ssh_pwauth: 1" >> /etc/cloud/cloud.cfg'
|
||||||
|
else
|
||||||
|
echo "ssh_pwauth exist. make sure ssh_pwauth enabled"
|
||||||
|
sed -i -e 's/ssh_pwauth: *0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg
|
||||||
|
sed -i -e 's/ssh_pwauth: *False/ssh_pwauth: True/g' /etc/cloud/cloud.cfg
|
||||||
|
sed -i -e 's/ssh_pwauth: *false/ssh_pwauth: true/g' /etc/cloud/cloud.cfg
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
@ -1,2 +1,3 @@
|
|||||||
debootstrap
|
debootstrap
|
||||||
|
dib-python
|
||||||
pkg-map
|
pkg-map
|
||||||
|
@ -54,4 +54,13 @@ $apt_get update
|
|||||||
$apt_get clean
|
$apt_get clean
|
||||||
$apt_get dist-upgrade -y
|
$apt_get dist-upgrade -y
|
||||||
|
|
||||||
$apt_get install -y busybox python sudo
|
$apt_get install -y busybox sudo
|
||||||
|
|
||||||
|
if [ "$DIB_PYTHON_VERSION" == "2" ]; then
|
||||||
|
$apt_get install -y python
|
||||||
|
elif [ "$DIB_PYTHON_VERSION" == "3" ]; then
|
||||||
|
$apt_get install -y python3
|
||||||
|
else
|
||||||
|
echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
0
diskimage_builder/elements/debian-minimal/test-elements/stable-build-succeeds/environment.d/10-set-distro.bash
Executable file → Normal file
0
diskimage_builder/elements/debian-minimal/test-elements/stable-build-succeeds/environment.d/10-set-distro.bash
Executable file → Normal file
0
diskimage_builder/elements/debian-minimal/test-elements/testing-build-succeeds/environment.d/10-set-distro.bash
Executable file → Normal file
0
diskimage_builder/elements/debian-minimal/test-elements/testing-build-succeeds/environment.d/10-set-distro.bash
Executable file → Normal file
0
diskimage_builder/elements/debian/test-elements/build-succeeds/environment.d/09-debian-stable
Executable file → Normal file
0
diskimage_builder/elements/debian/test-elements/build-succeeds/environment.d/09-debian-stable
Executable file → Normal file
0
diskimage_builder/elements/devuser/environment.d/50-devuser
Executable file → Normal file
0
diskimage_builder/elements/devuser/environment.d/50-devuser
Executable file → Normal file
@ -13,7 +13,6 @@ if [ "$DISTRO_NAME" != "gentoo" ]; then
|
|||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.sh /usr/local/sbin/dhcp-all-interfaces.sh
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.sh /usr/local/sbin/dhcp-all-interfaces.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIB_INIT_SYSTEM=$(dib-init-system)
|
|
||||||
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
||||||
if [ -e "/etc/redhat-release" ] ; then
|
if [ -e "/etc/redhat-release" ] ; then
|
||||||
# the init system is upstart but networking is using sysv compatabiliy (i.e. Centos/RHEL 6)
|
# the init system is upstart but networking is using sysv compatabiliy (i.e. Centos/RHEL 6)
|
||||||
@ -23,7 +22,7 @@ if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
|||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf
|
||||||
fi
|
fi
|
||||||
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service
|
||||||
install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
||||||
elif [ "$DIB_INIT_SYSTEM" == "sysv" ]; then
|
elif [ "$DIB_INIT_SYSTEM" == "sysv" ]; then
|
||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces
|
||||||
|
@ -1 +1,2 @@
|
|||||||
export DIB_INIT_SYSTEM=$(PATH="$PATH:$(dirname $BASH_SOURCE)/.." dib-init-system)
|
DIB_INIT_SYSTEM=$(PATH="$PATH:$(dirname $BASH_SOURCE)/.." dib-init-system)
|
||||||
|
export DIB_INIT_SYSTEM
|
||||||
|
@ -7,3 +7,6 @@ or python3 executable. This is useful for creating #! lines for scripts that
|
|||||||
are compatible with both python2 and python3.
|
are compatible with both python2 and python3.
|
||||||
|
|
||||||
This does not install a python if one does not exist, and instead fails.
|
This does not install a python if one does not exist, and instead fails.
|
||||||
|
|
||||||
|
This also exports a variable DIB_PYTHON_VERSION which will either be '2' or
|
||||||
|
'3' depending on the python version which dib-python points to.
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
# Pick which distros we need to force python2
|
||||||
|
if [ -z "${DIB_PYTHON_VERSION:-}" ]; then
|
||||||
|
if [ "$DISTRO_NAME" == "ubuntu" ]; then
|
||||||
|
if [ "$DIB_RELEASE" == "precise" ]; then
|
||||||
|
DIB_PYTHON_VERSION=2
|
||||||
|
elif [ "$DIB_RELEASE" == "trusty" ]; then
|
||||||
|
DIB_PYTHON_VERSION=2
|
||||||
|
fi
|
||||||
|
elif [ "$DISTRO_NAME" == "debian" ]; then
|
||||||
|
DIB_PYTHON_VERSION=2
|
||||||
|
elif [ "$DISTRO_NAME" == "fedora" ]; then
|
||||||
|
if [ "$DIB_RELEASE" -le 22 ]; then
|
||||||
|
DIB_PYTHON_VERSION=2
|
||||||
|
fi
|
||||||
|
elif [ "$DISTRO_NAME" == "centos" ]; then
|
||||||
|
DIB_PYTHON_VERSION=2
|
||||||
|
elif [ "$DISTRO_NAME" == "centos7" ]; then
|
||||||
|
DIB_PYTHON_VERSION=2
|
||||||
|
elif [ "$DISTRO_NAME" == "opensuse" ]; then
|
||||||
|
DIB_PYTHON_VERSION=2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${DIB_PYTHON_VERSION:-}" ]; then
|
||||||
|
DIB_PYTHON_VERSION=3
|
||||||
|
fi
|
||||||
|
|
||||||
|
export DIB_PYTHON_VERSION
|
@ -6,9 +6,9 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
python_path=$(command -v python2 || command -v python3)
|
python_path=$(command -v python${DIB_PYTHON_VERSION})
|
||||||
if [ -z "$python_path" ]; then
|
if [ -z "$python_path" ]; then
|
||||||
echo "Could not find python2 or python3 executable."
|
echo "Could not find python${DIB_PYTHON_VERSION} executable."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
0
diskimage_builder/elements/dynamic-login/init-scripts/upstart/dynamic-login.conf
Executable file → Normal file
0
diskimage_builder/elements/dynamic-login/init-scripts/upstart/dynamic-login.conf
Executable file → Normal file
@ -8,7 +8,6 @@ set -o pipefail
|
|||||||
|
|
||||||
SCRIPTDIR=$(dirname $0)
|
SCRIPTDIR=$(dirname $0)
|
||||||
|
|
||||||
DIB_INIT_SYSTEM=$(dib-init-system)
|
|
||||||
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
||||||
install -m 0644 -o root -g root ${SCRIPTDIR}/ttySx.conf /etc/init/ttySx.conf
|
install -m 0644 -o root -g root ${SCRIPTDIR}/ttySx.conf /etc/init/ttySx.conf
|
||||||
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
||||||
|
0
diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash
Executable file → Normal file
0
diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash
Executable file → Normal file
0
diskimage_builder/elements/manifests/environment.d/14-manifests
Executable file → Normal file
0
diskimage_builder/elements/manifests/environment.d/14-manifests
Executable file → Normal file
@ -26,6 +26,10 @@ example ``package-installs.yaml``
|
|||||||
not-arch: ppc64, ppc64le
|
not-arch: ppc64, ppc64le
|
||||||
lshw:
|
lshw:
|
||||||
arch: ppc64, ppc64le
|
arch: ppc64, ppc64le
|
||||||
|
python-dev:
|
||||||
|
dib_python_version: 2
|
||||||
|
python3-dev:
|
||||||
|
dib_python_version: 3
|
||||||
|
|
||||||
example package-installs.json
|
example package-installs.json
|
||||||
|
|
||||||
@ -46,6 +50,7 @@ the following default values::
|
|||||||
uninstall: False
|
uninstall: False
|
||||||
installtype: * (Install package for all installtypes)
|
installtype: * (Install package for all installtypes)
|
||||||
arch: * (Install package for all architectures)
|
arch: * (Install package for all architectures)
|
||||||
|
dib_python_version: (2 or 3 depending on DIB_PYTHON_VERSION, see dib-python)
|
||||||
|
|
||||||
Setting the installtype property causes the package only to be installed if
|
Setting the installtype property causes the package only to be installed if
|
||||||
the specified installtype would be used for the element. See the
|
the specified installtype would be used for the element. See the
|
||||||
|
@ -75,8 +75,12 @@ def collect_data(data, filename, element_name):
|
|||||||
installtype == elem_installtype)
|
installtype == elem_installtype)
|
||||||
valid_arch = _valid_for_arch(pkg_name, params.get('arch', None),
|
valid_arch = _valid_for_arch(pkg_name, params.get('arch', None),
|
||||||
params.get('not-arch', None))
|
params.get('not-arch', None))
|
||||||
|
dib_py_version = str(params.get('dib_python_version', ''))
|
||||||
|
dib_py_version_env = os.environ.get('DIB_PYTHON_VERSION', '')
|
||||||
|
valid_dib_python_version = (dib_py_version == '' or
|
||||||
|
dib_py_version == dib_py_version_env)
|
||||||
|
|
||||||
if valid_installtype and valid_arch:
|
if valid_installtype and valid_arch and valid_dib_python_version:
|
||||||
data[phase][install].append((pkg_name, element_name))
|
data[phase][install].append((pkg_name, element_name))
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
@ -10,3 +10,6 @@ from get-pip.py and pip (respectively).
|
|||||||
To install pip and virtualenv from package:
|
To install pip and virtualenv from package:
|
||||||
|
|
||||||
export DIB_INSTALLTYPE_pip_and_virtualenv=package
|
export DIB_INSTALLTYPE_pip_and_virtualenv=package
|
||||||
|
|
||||||
|
Any element that uses these commands must be designated as
|
||||||
|
05-* or higher to ensure that they are first installed.
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
|
dib-python
|
||||||
|
install-types
|
||||||
package-installs
|
package-installs
|
||||||
source-repositories
|
source-repositories
|
||||||
|
@ -2,7 +2,22 @@
|
|||||||
# early enough because pip depends on it.
|
# early enough because pip depends on it.
|
||||||
python-xml:
|
python-xml:
|
||||||
phase: pre-install.d
|
phase: pre-install.d
|
||||||
|
dib_python_version: 2
|
||||||
python-pip:
|
python-pip:
|
||||||
installtype: package
|
installtype: package
|
||||||
|
dib_python_version: 2
|
||||||
|
python3-pip:
|
||||||
|
installtype: package
|
||||||
|
dib_python_version: 3
|
||||||
python-virtualenv:
|
python-virtualenv:
|
||||||
installtype: package
|
installtype: package
|
||||||
|
dib_python_version: 2
|
||||||
|
python3-virtualenv:
|
||||||
|
installtype: package
|
||||||
|
dib_python_version: 3
|
||||||
|
python-dev:
|
||||||
|
installtype: source
|
||||||
|
dib_python_version: 2
|
||||||
|
python3-dev:
|
||||||
|
installtype: source
|
||||||
|
dib_python_version: 3
|
||||||
|
@ -2,10 +2,17 @@
|
|||||||
"family": {
|
"family": {
|
||||||
"gentoo": {
|
"gentoo": {
|
||||||
"python-pip": "dev-python/pip",
|
"python-pip": "dev-python/pip",
|
||||||
"python-virtualenv": "dev-python/virtualenv"
|
"python-virtualenv": "dev-python/virtualenv",
|
||||||
|
"python3-dev": "dev-lang/python"
|
||||||
},
|
},
|
||||||
"suse": {
|
"suse": {
|
||||||
"python-xml": "python-xml"
|
"python-xml": "python-xml",
|
||||||
|
"python2-dev": "python2-devel",
|
||||||
|
"python3-dev": "python3-devel"
|
||||||
|
},
|
||||||
|
"redhat": {
|
||||||
|
"python2-dev": "python2-devel",
|
||||||
|
"python3-dev": "python3-devel"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
|
0
diskimage_builder/elements/pip-cache/environment.d/10-pip-cache
Executable file → Normal file
0
diskimage_builder/elements/pip-cache/environment.d/10-pip-cache
Executable file → Normal file
34
diskimage_builder/elements/python-brickclient/README.rst
Normal file
34
diskimage_builder/elements/python-brickclient/README.rst
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
python-brickclient
|
||||||
|
==================
|
||||||
|
|
||||||
|
* This element is aimed for providing cinder local attach/detach functionality.
|
||||||
|
* Currently the feature has a dependency on a known bug
|
||||||
|
"https://launchpad.net/bugs/1623549", which has been resolved and will be part
|
||||||
|
of the upstream with the next release of python-brick-cinderclient-ext.
|
||||||
|
Note: Current version of python-brick-cinderclient-ext i.e. 0.2.0 requires and update
|
||||||
|
to be made in Line32 fo below script.
|
||||||
|
/usr/share/python-brickclient/venv/lib/python2.7/site-packages/brick_cinderclient_ext/__init__.py
|
||||||
|
update "brick-python-cinderclient-ext" to "python-brick-cinderclient-ext".
|
||||||
|
|
||||||
|
* Usage:
|
||||||
|
Pass the below shell script to parameter 'user-data' and set 'config-drive=true'
|
||||||
|
at the time of provisioning the node via nova-boot to make cinder local
|
||||||
|
attach/detach commands talk to your cloud controller.
|
||||||
|
[Example of Config Drive Script]
|
||||||
|
#!/bin/bash
|
||||||
|
FILE="/etc/bash.bashrc"
|
||||||
|
[ ! -f "$FILE" ] && touch "$FILE"
|
||||||
|
echo 'export OS_AUTH_URL="http://<controller_ip>:5000/v2.0"' >> "$FILE"
|
||||||
|
echo 'export OS_PASSWORD="password"' >> "$FILE"
|
||||||
|
echo 'export OS_USERNAME="demo"' >> "$FILE"
|
||||||
|
echo 'export OS_TENANT_NAME="demo"' >> "$FILE"
|
||||||
|
echo 'export OS_PROJECT_NAME="demo"' >> "$FILE"
|
||||||
|
exec bash
|
||||||
|
To attach: /usr/share/python-brickclient/venv/bin/cinder local-attach <volume_id>
|
||||||
|
To detach: /usr/share/python-brickclient/venv/bin/cinder local-detach <volume_id>
|
||||||
|
|
||||||
|
* Alternatively, the same action can be completed manually at the node which does
|
||||||
|
not require setting up of config drive such as:
|
||||||
|
/usr/share/python-brickclient/venv/bin/cinder --os-username demo --os-password \
|
||||||
|
password --os-tenant-name demo --os-project-name demo \
|
||||||
|
--os-auth-url=http://<controller_ip>:5000/v2.0 local-attach <volume_id>
|
@ -0,0 +1,2 @@
|
|||||||
|
package-installs
|
||||||
|
pip-and-virtualenv
|
@ -0,0 +1,3 @@
|
|||||||
|
libssl-dev:
|
||||||
|
libffi-dev:
|
||||||
|
python-dev:
|
14
diskimage_builder/elements/python-brickclient/pkg-map
Normal file
14
diskimage_builder/elements/python-brickclient/pkg-map
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"family": {
|
||||||
|
"redhat": {
|
||||||
|
"python-dev": "python2-devel",
|
||||||
|
"libssl-dev": "openssl-devel",
|
||||||
|
"libffi-dev": "libffi-devel"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"python-dev": "python-dev",
|
||||||
|
"libssl-dev": "libssl-dev",
|
||||||
|
"libffi-dev": "libffi-dev"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright 2016 Hewlett Packard Enterprise Company, L.P.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
PBCDIR=/usr/share/python-brickclient
|
||||||
|
mkdir $PBCDIR
|
||||||
|
|
||||||
|
# create the virtual environment
|
||||||
|
virtualenv $PBCDIR/venv
|
||||||
|
|
||||||
|
# Install the required packages inside virtual env
|
||||||
|
$PBCDIR/venv/bin/pip install python-brick-cinderclient-ext
|
||||||
|
|
||||||
|
ln -s $PBCDIR/venv/bin/python-brickclient /usr/local/bin/python-brickclient
|
0
diskimage_builder/elements/ramdisk-base/extra-data.d/scripts/d/init-func
Executable file → Normal file
0
diskimage_builder/elements/ramdisk-base/extra-data.d/scripts/d/init-func
Executable file → Normal file
0
diskimage_builder/elements/redhat-common/environment.d/50-redhat-common
Executable file → Normal file
0
diskimage_builder/elements/redhat-common/environment.d/50-redhat-common
Executable file → Normal file
@ -15,7 +15,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import six
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
|
||||||
@ -39,7 +38,7 @@ def merge_data(source, destination, distro):
|
|||||||
result = dict()
|
result = dict()
|
||||||
result.update(destination)
|
result.update(destination)
|
||||||
family = os_family(distro)
|
family = os_family(distro)
|
||||||
for servicename, mapping in six.iteritems(source):
|
for servicename, mapping in source.items():
|
||||||
if servicename in result:
|
if servicename in result:
|
||||||
raise Exception("%s already found in services list" % servicename)
|
raise Exception("%s already found in services list" % servicename)
|
||||||
if distro in mapping:
|
if distro in mapping:
|
||||||
|
@ -26,7 +26,18 @@ fi
|
|||||||
|
|
||||||
FILENAME="/etc/sysctl.d/${NAME}.conf"
|
FILENAME="/etc/sysctl.d/${NAME}.conf"
|
||||||
|
|
||||||
|
if [ -f $FILENAME ]; then
|
||||||
|
# check to make sure the settings match... otherwise fail
|
||||||
|
if ! grep -q "^$NAME = $VALUE" $FILENAME; then
|
||||||
|
echo "Conflicting sysctl.conf setting for $NAME == $VALUE. Found:"
|
||||||
|
grep "^$NAME" $FILENAME
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
|
||||||
cat > $FILENAME <<EOF_CAT
|
cat > $FILENAME <<EOF_CAT
|
||||||
# $COMMENT
|
# $COMMENT
|
||||||
$NAME = $VALUE
|
$NAME = $VALUE
|
||||||
EOF_CAT
|
EOF_CAT
|
||||||
|
|
||||||
|
fi
|
||||||
|
@ -43,4 +43,13 @@ $apt_get update
|
|||||||
$apt_get clean
|
$apt_get clean
|
||||||
$apt_get dist-upgrade -y
|
$apt_get dist-upgrade -y
|
||||||
|
|
||||||
$apt_get install -y busybox python sudo
|
$apt_get install -y busybox sudo
|
||||||
|
|
||||||
|
if [ "$DIB_PYTHON_VERSION" == "2" ]; then
|
||||||
|
$apt_get install -y python
|
||||||
|
elif [ "$DIB_PYTHON_VERSION" == "3" ]; then
|
||||||
|
$apt_get install -y python3
|
||||||
|
else
|
||||||
|
echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
audit:
|
audit:
|
||||||
dracut:
|
dracut:
|
||||||
|
dracut-config-generic:
|
||||||
grubby:
|
grubby:
|
||||||
kernel:
|
kernel:
|
||||||
initscripts:
|
initscripts:
|
||||||
|
@ -423,7 +423,7 @@ fi
|
|||||||
|
|
||||||
# End: Creation of the partitions
|
# End: Creation of the partitions
|
||||||
|
|
||||||
sudo mkfs $MKFS_OPTS -t $FS_TYPE -L ${DIB_ROOT_LABEL} ${IMAGE_BLOCK_DEVICE}
|
sudo mkfs -t $FS_TYPE $MKFS_OPTS -L ${DIB_ROOT_LABEL} ${IMAGE_BLOCK_DEVICE}
|
||||||
# Tuning the rootfs uuid works only for ext filesystems.
|
# Tuning the rootfs uuid works only for ext filesystems.
|
||||||
if echo "$FS_TYPE" | grep -q "^ext"; then
|
if echo "$FS_TYPE" | grep -q "^ext"; then
|
||||||
sudo tune2fs -U ${DIB_IMAGE_ROOT_FS_UUID} ${IMAGE_BLOCK_DEVICE}
|
sudo tune2fs -U ${DIB_IMAGE_ROOT_FS_UUID} ${IMAGE_BLOCK_DEVICE}
|
||||||
|
@ -265,18 +265,25 @@ three partitions are created: all are about 1/3 of the disk size.
|
|||||||
Filesystem Caveat
|
Filesystem Caveat
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
By default, disk-image-create uses a 4k byte-to-inode ratio when creating the
|
By default, disk-image-create uses a 4k byte-to-inode ratio when
|
||||||
filesystem in the image. This allows large 'whole-system' images to utilize
|
creating the filesystem in the image. This allows large 'whole-system'
|
||||||
several TB disks without exhausting inodes. In contrast, when creating images
|
images to utilize several TB disks without exhausting inodes. In
|
||||||
intended for tenant instances, this ratio consumes more disk space than an
|
contrast, when creating images intended for tenant instances, this
|
||||||
end-user would expect (e.g. a 50GB root disk has 47GB avail.). If the image is
|
ratio consumes more disk space than an end-user would expect (e.g. a
|
||||||
intended to run within a tens to hundrededs of gigabyte disk, setting the
|
50GB root disk has 47GB avail.). If the image is intended to run
|
||||||
byte-to-inode ratio to the ext4 default of 16k will allow for more usable space
|
within a tens to hundrededs of gigabyte disk, setting the
|
||||||
on the instance. The default can be overridden by passing --mkfs-options like
|
byte-to-inode ratio to the ext4 default of 16k will allow for more
|
||||||
this::
|
usable space on the instance. The default can be overridden by passing
|
||||||
|
``--mkfs-options`` like this::
|
||||||
|
|
||||||
disk-image-create --mkfs-options '-i 16384' <distro> vm
|
disk-image-create --mkfs-options '-i 16384' <distro> vm
|
||||||
|
|
||||||
|
You can also select a different filesystem by setting the ``FS_TYPE``
|
||||||
|
environment variable.
|
||||||
|
|
||||||
|
Note ``--mkfs-options`` are options passed to the mfks *driver*,
|
||||||
|
rather than ``mkfs`` itself (i.e. after the initial `-t` argument).
|
||||||
|
|
||||||
Speedups
|
Speedups
|
||||||
--------
|
--------
|
||||||
If you have 4GB of available physical RAM (as reported by /proc/meminfo
|
If you have 4GB of available physical RAM (as reported by /proc/meminfo
|
||||||
|
@ -3,8 +3,8 @@ name = diskimage-builder
|
|||||||
summary = Golden Disk Image builder.
|
summary = Golden Disk Image builder.
|
||||||
description-file =
|
description-file =
|
||||||
README.rst
|
README.rst
|
||||||
author = HP Cloud Services
|
author = OpenStack
|
||||||
author_email = openstack-dev@lists.openstack.org
|
author-email = openstack-dev@lists.openstack.org
|
||||||
license: Apache License (2.0)
|
license: Apache License (2.0)
|
||||||
home-page = http://docs.openstack.org/developer/diskimage-builder/
|
home-page = http://docs.openstack.org/developer/diskimage-builder/
|
||||||
classifier =
|
classifier =
|
||||||
|
@ -32,6 +32,8 @@ DEFAULT_SKIP_TESTS=(
|
|||||||
debian-minimal/testing-build-succeeds
|
debian-minimal/testing-build-succeeds
|
||||||
# Currently failing due to bug in locale generation
|
# Currently failing due to bug in locale generation
|
||||||
centos-minimal/build-succeeds
|
centos-minimal/build-succeeds
|
||||||
|
# No longer reasonable to test upstream (lacks a mirror in infra)
|
||||||
|
centos/build-succeeds
|
||||||
)
|
)
|
||||||
|
|
||||||
function log_with_prefix {
|
function log_with_prefix {
|
||||||
|
2
tox.ini
2
tox.ini
@ -39,5 +39,5 @@ commands = python setup.py build_sphinx
|
|||||||
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E126,E127,E125,H202,H302,H803
|
ignore = E125,E126,E127,H202,H803
|
||||||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,conf.py
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,conf.py
|
||||||
|
Loading…
Reference in New Issue
Block a user