summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fuel/build/Makefile5
-rw-r--r--fuel/build/config.mk4
-rw-r--r--fuel/build/f_isoroot/Makefile4
-rwxr-xr-xfuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh109
-rwxr-xr-xfuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig109
-rw-r--r--fuel/build/f_isoroot/f_kscfg/ks.cfg38
-rw-r--r--fuel/build/f_isoroot/f_kscfg/ks.cfg.orig38
-rw-r--r--fuel/build/f_isoroot/f_repobuild/Makefile6
-rw-r--r--fuel/build/fuel-main_3.patch19
9 files changed, 259 insertions, 73 deletions
diff --git a/fuel/build/Makefile b/fuel/build/Makefile
index 80ef8ea51..6e7041dc0 100644
--- a/fuel/build/Makefile
+++ b/fuel/build/Makefile
@@ -18,7 +18,7 @@ SHELL = /bin/bash
# BEGIN of variables to customize
#
#Input args
-export ISOSRC = file:$(shell pwd)/fuel-6.1.iso
+export ISOSRC = file:$(shell pwd)/fuel-7.0.iso
export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
export PRODNO = "OPNFV_BGS"
export REVSTATE = "P0000"
@@ -77,9 +77,6 @@ $(ISOCACHE):
@echo "fuel" `git -C /tmp/fuel-main show | grep commit | head -1 | cut -d " " -f2` >> $(VERSION_FILE)
# Setup cgroups for docker-in-docker
sudo /root/enable_dockerx2
- # Temporary patch to accomodate for new Ubuntu trusty devops keys not yet
- # backported to fuel 6.0 or 6.1
- cd /tmp/fuel-main && patch -p0 < $(TOPDIR)/fuel-main_3.patch
# Patch for adding dosfstools, as Fuel 6.1 is running mkfs.vfat
cd /tmp/fuel-main && patch -p0 < $(TOPDIR)/fuel-main_5.patch
# Patch for changing the second layer Docker --bip address
diff --git a/fuel/build/config.mk b/fuel/build/config.mk
index d13a59b68..2f0542993 100644
--- a/fuel/build/config.mk
+++ b/fuel/build/config.mk
@@ -8,8 +8,8 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-FUEL_MAIN_REPO := https://github.com/openstack/fuel-main
-FUEL_MAIN_TAG = stable/6.1
+FUEL_MAIN_REPO := https://github.com/stackforge/fuel-main
+FUEL_MAIN_TAG = stable/7.0
DOCKER_REPO := http://get.docker.com/builds/Linux/x86_64
DOCKER_TAG := docker-latest
diff --git a/fuel/build/f_isoroot/Makefile b/fuel/build/f_isoroot/Makefile
index 3831a09f0..968806c53 100644
--- a/fuel/build/f_isoroot/Makefile
+++ b/fuel/build/f_isoroot/Makefile
@@ -8,7 +8,9 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-SUBDIRS = f_kscfg f_bootstrap f_repobuild f_odlpluginbuild
+SUBDIRS = f_kscfg f_bootstrap f_repobuild
+# Disable f_odlplugin waiting for Fuel 7 uplift
+#SUBDIRS += f_odlpluginbuild
SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
.PHONY: all
diff --git a/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
index e29552d44..065d0cb7d 100755
--- a/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
+++ b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
@@ -5,7 +5,7 @@ function countdown() {
local i
sleep 1
for ((i=$1-1; i>=1; i--)); do
- printf '\b\b%02d' "$i"
+ printf '\b\b\b\b%04d' "$i"
sleep 1
done
}
@@ -16,13 +16,18 @@ function fail() {
}
# LANG variable is a workaround for puppet-3.4.2 bug. See LP#1312758 for details
export LANG=en_US.UTF8
+export ADMIN_INTERFACE=eth0
+
showmenu="no"
-if [ -f /root/.showfuelmenu ]; then
- . /root/.showfuelmenu
+if [ -f /etc/fuel/bootstrap_admin_node.conf ]; then
+ . /etc/fuel/bootstrap_admin_node.conf
+ echo "Applying admin interface '$ADMIN_INTERFACE'"
fi
-echo -n "Applying default Fuel settings..."
-fuelmenu --save-only --iface=eth0
+echo "Applying default Fuel settings..."
+set -x
+fuelmenu --save-only --iface=$ADMIN_INTERFACE
+set +x
echo "Done!"
### OPNFV addition BEGIN
@@ -40,7 +45,7 @@ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
else
#Give user 15 seconds to enter fuelmenu or else continue
echo
- echo -n "Press a key to enter Fuel Setup (or press ESC to skip)... 15"
+ echo -n "Press a key to enter Fuel Setup (or press ESC to skip)... 15"
countdown 15 & pid=$!
if ! read -s -n 1 -t 15 key; then
echo -e "\nSkipping Fuel Setup..."
@@ -56,11 +61,89 @@ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
fi
fi
+if [ "$wait_for_external_config" == "yes" ]; then
+ wait_timeout=3000
+ pidfile=/var/lock/wait_for_external_config
+ echo -n "Waiting for external configuration (or press ESC to skip)...
+$wait_timeout"
+ countdown $wait_timeout & countdown_pid=$!
+ exec -a wait_for_external_config sleep $wait_timeout & wait_pid=$!
+ echo $wait_pid > $pidfile
+ while ps -p $countdown_pid &> /dev/null && ps -p $wait_pid &>/dev/null; do
+ read -s -n 1 -t 2 key
+ case "$key" in
+ $'\e') echo -e "\b\b\b\b abort on user input"
+ break
+ ;;
+ *) ;;
+ esac
+ done
+ { kill $countdown_pid $wait_pid & wait $!; }
+ rm -f $pidfile
+fi
+
#Reread /etc/sysconfig/network to inform puppet of changes
. /etc/sysconfig/network
hostname "$HOSTNAME"
+# XXX: ssh keys which should be included into the bootstrap image are
+# generated during containers deployment. However cobbler checkfs for
+# a kernel and initramfs when creating a profile, which poses chicken
+# and egg problem. Fortunately cobbler is pretty happy with empty files
+# so it's easy to break the loop.
+make_ubuntu_bootstrap_stub () {
+ local bootstrap_dir='/var/www/nailgun/bootstrap/ubuntu'
+ mkdir -p $bootstrap_dir
+ for item in linux initramfs.img; do
+ touch "$bootstrap_dir/$item"
+ done
+}
+
+get_bootstrap_flavor () {
+ local ASTUTE_YAML='/etc/fuel/astute.yaml'
+ python <<-EOF
+ from fuelmenu.fuelmenu import Settings
+ conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {})
+ print(conf.get('flavor', 'centos'))
+ EOF
+}
+
+# Actually build the bootstrap image
+build_ubuntu_bootstrap () {
+ local ret=1
+ local max_attempts=3
+ local config='/etc/fuel-bootstrap-image.conf'
+ local log='/var/log/fuel-bootstrap-image-build.log'
+ if ! grep -qE '^BOOTSTRAP_SSH_KEYS' "$config"; then
+ # FIXME: config file generated by fuelmenu has no trailing newline
+ echo >> "$config"
+ cat >> "$config" <<-EOF
+ BOOTSTRAP_SSH_KEYS=/root/.ssh/id_rsa.pub
+ EOF
+ fi
+ for n in `seq 1 $max_attempts`; do
+ echo "Bulding bootstrap image, attempt $n" >&2
+ if fuel-bootstrap-image >>"$log" 2>&1; then
+ ret=0
+ fuel-bootstrap-image-set "ubuntu"
+ break
+ fi
+ done
+ if [ $ret -ne 0 ]; then
+ warning="WARNING: failed to build the bootstrap image, see $log for details.
+Perhaps your Internet connection is broken. Please fix the problem and run
+\`fuel-bootstrap-image-set ubuntu\`"
+ fuel notify --topic warning --send "$warning"
+ fi
+ return $ret
+}
+
+
+# Create empty files to make cobbler happy
+# (even if we don't use Ubuntu based bootstrap)
+make_ubuntu_bootstrap_stub
+
service docker start
if [ -f /root/.build_images ]; then
@@ -106,11 +189,16 @@ puppet apply --detailed-exitcodes -d -v /etc/puppet/modules/nailgun/examples/hos
if [ $? -ge 4 ];then
fail
fi
+
rmdir /var/log/remote && ln -s /var/log/docker-logs/remote /var/log/remote
dockerctl check || fail
bash /etc/rc.local
+if [ "`get_bootstrap_flavor`" = "ubuntu" ]; then
+ build_ubuntu_bootstrap || true
+fi
+
### OPNFV addition BEGIN
shopt -s nullglob
for script in /opt/opnfv/bootstrap/post.d/*.sh
@@ -125,7 +213,7 @@ shopt -u nullglob
cat > /etc/yum.repos.d/mos${FUEL_RELEASE}-updates.repo << EOF
[mos${FUEL_RELEASE}-updates]
name=mos${FUEL_RELEASE}-updates
-baseurl=http://mirror.fuel-infra.org/mos/centos-6/mos${FUEL_RELEASE}/updates/
+baseurl=http://mirror.fuel-infra.org/mos-repos/centos/mos${FUEL_RELEASE}-centos6-fuel/updates/x86_64/
gpgcheck=0
skip_if_unavailable=1
EOF
@@ -134,7 +222,7 @@ EOF
cat > /etc/yum.repos.d/mos${FUEL_RELEASE}-security.repo << EOF
[mos${FUEL_RELEASE}-security]
name=mos${FUEL_RELEASE}-security
-baseurl=http://mirror.fuel-infra.org/mos/centos-6/mos${FUEL_RELEASE}/security/
+baseurl=http://mirror.fuel-infra.org/mos-repos/centos/mos${FUEL_RELEASE}-centos6-fuel/security/x86_64/
gpgcheck=0
skip_if_unavailable=1
EOF
@@ -170,4 +258,9 @@ echo "*************************************************"
echo "Sending notification to Fuel UI..."
fuel notify --topic "${level}" --send "${message}"
+# TODO(kozhukalov) If building of bootstrap image fails
+# and if this image was supposed to be a default bootstrap image
+# we need to warn a user about this and give her
+# advice how to treat this.
+
echo "Fuel node deployment complete!"
diff --git a/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig
index 6c18a6df2..1bc349314 100755
--- a/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig
+++ b/fuel/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig
@@ -5,7 +5,7 @@ function countdown() {
local i
sleep 1
for ((i=$1-1; i>=1; i--)); do
- printf '\b\b%02d' "$i"
+ printf '\b\b\b\b%04d' "$i"
sleep 1
done
}
@@ -16,13 +16,18 @@ function fail() {
}
# LANG variable is a workaround for puppet-3.4.2 bug. See LP#1312758 for details
export LANG=en_US.UTF8
+export ADMIN_INTERFACE=eth0
+
showmenu="no"
-if [ -f /root/.showfuelmenu ]; then
- . /root/.showfuelmenu
+if [ -f /etc/fuel/bootstrap_admin_node.conf ]; then
+ . /etc/fuel/bootstrap_admin_node.conf
+ echo "Applying admin interface '$ADMIN_INTERFACE'"
fi
-echo -n "Applying default Fuel settings..."
-fuelmenu --save-only --iface=eth0
+echo "Applying default Fuel settings..."
+set -x
+fuelmenu --save-only --iface=$ADMIN_INTERFACE
+set +x
echo "Done!"
if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
@@ -30,7 +35,7 @@ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
else
#Give user 15 seconds to enter fuelmenu or else continue
echo
- echo -n "Press a key to enter Fuel Setup (or press ESC to skip)... 15"
+ echo -n "Press a key to enter Fuel Setup (or press ESC to skip)... 15"
countdown 15 & pid=$!
if ! read -s -n 1 -t 15 key; then
echo -e "\nSkipping Fuel Setup..."
@@ -46,11 +51,89 @@ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
fi
fi
+if [ "$wait_for_external_config" == "yes" ]; then
+ wait_timeout=3000
+ pidfile=/var/lock/wait_for_external_config
+ echo -n "Waiting for external configuration (or press ESC to skip)...
+$wait_timeout"
+ countdown $wait_timeout & countdown_pid=$!
+ exec -a wait_for_external_config sleep $wait_timeout & wait_pid=$!
+ echo $wait_pid > $pidfile
+ while ps -p $countdown_pid &> /dev/null && ps -p $wait_pid &>/dev/null; do
+ read -s -n 1 -t 2 key
+ case "$key" in
+ $'\e') echo -e "\b\b\b\b abort on user input"
+ break
+ ;;
+ *) ;;
+ esac
+ done
+ { kill $countdown_pid $wait_pid & wait $!; }
+ rm -f $pidfile
+fi
+
#Reread /etc/sysconfig/network to inform puppet of changes
. /etc/sysconfig/network
hostname "$HOSTNAME"
+# XXX: ssh keys which should be included into the bootstrap image are
+# generated during containers deployment. However cobbler checkfs for
+# a kernel and initramfs when creating a profile, which poses chicken
+# and egg problem. Fortunately cobbler is pretty happy with empty files
+# so it's easy to break the loop.
+make_ubuntu_bootstrap_stub () {
+ local bootstrap_dir='/var/www/nailgun/bootstrap/ubuntu'
+ mkdir -p $bootstrap_dir
+ for item in linux initramfs.img; do
+ touch "$bootstrap_dir/$item"
+ done
+}
+
+get_bootstrap_flavor () {
+ local ASTUTE_YAML='/etc/fuel/astute.yaml'
+ python <<-EOF
+ from fuelmenu.fuelmenu import Settings
+ conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {})
+ print(conf.get('flavor', 'centos'))
+ EOF
+}
+
+# Actually build the bootstrap image
+build_ubuntu_bootstrap () {
+ local ret=1
+ local max_attempts=3
+ local config='/etc/fuel-bootstrap-image.conf'
+ local log='/var/log/fuel-bootstrap-image-build.log'
+ if ! grep -qE '^BOOTSTRAP_SSH_KEYS' "$config"; then
+ # FIXME: config file generated by fuelmenu has no trailing newline
+ echo >> "$config"
+ cat >> "$config" <<-EOF
+ BOOTSTRAP_SSH_KEYS=/root/.ssh/id_rsa.pub
+ EOF
+ fi
+ for n in `seq 1 $max_attempts`; do
+ echo "Bulding bootstrap image, attempt $n" >&2
+ if fuel-bootstrap-image >>"$log" 2>&1; then
+ ret=0
+ fuel-bootstrap-image-set "ubuntu"
+ break
+ fi
+ done
+ if [ $ret -ne 0 ]; then
+ warning="WARNING: failed to build the bootstrap image, see $log for details.
+Perhaps your Internet connection is broken. Please fix the problem and run
+\`fuel-bootstrap-image-set ubuntu\`"
+ fuel notify --topic warning --send "$warning"
+ fi
+ return $ret
+}
+
+
+# Create empty files to make cobbler happy
+# (even if we don't use Ubuntu based bootstrap)
+make_ubuntu_bootstrap_stub
+
service docker start
if [ -f /root/.build_images ]; then
@@ -96,16 +179,21 @@ puppet apply --detailed-exitcodes -d -v /etc/puppet/modules/nailgun/examples/hos
if [ $? -ge 4 ];then
fail
fi
+
rmdir /var/log/remote && ln -s /var/log/docker-logs/remote /var/log/remote
dockerctl check || fail
bash /etc/rc.local
+if [ "`get_bootstrap_flavor`" = "ubuntu" ]; then
+ build_ubuntu_bootstrap || true
+fi
+
# Enable updates repository
cat > /etc/yum.repos.d/mos${FUEL_RELEASE}-updates.repo << EOF
[mos${FUEL_RELEASE}-updates]
name=mos${FUEL_RELEASE}-updates
-baseurl=http://mirror.fuel-infra.org/mos/centos-6/mos${FUEL_RELEASE}/updates/
+baseurl=http://mirror.fuel-infra.org/mos-repos/centos/mos${FUEL_RELEASE}-centos6-fuel/updates/x86_64/
gpgcheck=0
skip_if_unavailable=1
EOF
@@ -114,7 +202,7 @@ EOF
cat > /etc/yum.repos.d/mos${FUEL_RELEASE}-security.repo << EOF
[mos${FUEL_RELEASE}-security]
name=mos${FUEL_RELEASE}-security
-baseurl=http://mirror.fuel-infra.org/mos/centos-6/mos${FUEL_RELEASE}/security/
+baseurl=http://mirror.fuel-infra.org/mos-repos/centos/mos${FUEL_RELEASE}-centos6-fuel/security/x86_64/
gpgcheck=0
skip_if_unavailable=1
EOF
@@ -150,4 +238,9 @@ echo "*************************************************"
echo "Sending notification to Fuel UI..."
fuel notify --topic "${level}" --send "${message}"
+# TODO(kozhukalov) If building of bootstrap image fails
+# and if this image was supposed to be a default bootstrap image
+# we need to warn a user about this and give her
+# advice how to treat this.
+
echo "Fuel node deployment complete!"
diff --git a/fuel/build/f_isoroot/f_kscfg/ks.cfg b/fuel/build/f_isoroot/f_kscfg/ks.cfg
index b3d56044b..9bdec9625 100644
--- a/fuel/build/f_isoroot/f_kscfg/ks.cfg
+++ b/fuel/build/f_isoroot/f_kscfg/ks.cfg
@@ -251,8 +251,9 @@ daemonize
dhcp
docker-io
fuel-bootstrap-image
+fuel-bootstrap-image-builder
fuel-createmirror
-fuel-target-centos-images
+fuel-target-centos-images6.6
fuel-package-updates
fuelmenu
fuel-docker-images
@@ -328,7 +329,7 @@ esac
set -x
function save_cfg {
- scrFile="/etc/sysconfig/network-scripts/ifcfg-$device"
+ scrFile="/etc/sysconfig/network-scripts/ifcfg-$admin_interface"
search="domain $domain\nsearch $domain"
sed -i -e 's#^\(HOSTNAME=\).*$#\1'"$hostname"'#' /etc/sysconfig/network
grep -q "^\s*$ip\s+$hostname" /etc/hosts || echo "$ip $hostname" >> /etc/hosts
@@ -338,7 +339,7 @@ function save_cfg {
[ $dns2 ] && echo "nameserver $dns2" >> /etc/resolv.conf
[ $dns2 ] && echo "nameserver $dns2" >> /etc/dnsmasq.upstream
- echo DEVICE=$device > $scrFile
+ echo DEVICE=$admin_interface > $scrFile
echo ONBOOT=yes >> $scrFile
echo NM_CONTROLLED=no >> $scrFile
echo HWADDR=$hwaddr >> $scrFile
@@ -353,7 +354,7 @@ function save_cfg {
fi
scrDHCPFile="/etc/sysconfig/network-scripts/ifcfg-$dhcp_interface"
#Ignore gateway and set up DHCP if it is used, otherwise apply it
- if [ $dhcp_interface ] && [ "$dhcp_interface" != "$device" ]; then
+ if [ $dhcp_interface ] && [ "$dhcp_interface" != "$admin_interface" ]; then
echo "DEVICE=$dhcp_interface" > $scrDHCPFile
echo "BOOTPROTO=dhcp" >> $scrDHCPFile
echo "ONBOOT=yes" >> $scrDHCPFile
@@ -373,10 +374,11 @@ domain=${hostname#*.}
ip=$ip
netmask=$netmask
gw=$gw
-device="eth0"
-hwaddr=`ifconfig $device | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
+admin_interface=${admin_interface:-"eth0"}
+hwaddr=`ifconfig $admin_interface | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
dhcp_interface=$dhcp_interface
build_images=$build_images
+wait_for_external_config=$wait_for_external_config
save_cfg
# Mounting installation source
@@ -484,7 +486,7 @@ on master node and change default repository settings:
* Ubuntu: fuel-createmirror (see --help for options)
Please refer to the following guide for more information:
-https://docs.mirantis.com/openstack/fuel/fuel-6.1/reference-architecture.html#fuel-rep-mirror
+https://docs.mirantis.com/openstack/fuel/fuel-7.0/reference-architecture.html#fuel-rep-mirror
EOF
@@ -506,12 +508,20 @@ cp ${SOURCE}/version.yaml /etc/fuel/release_versions/`cat ${SOURCE}/openstack_v
# Generete Fuel UUID
uuidgen > /etc/fuel/fuel-uuid
-###Run fuel menu
+# Run fuel menu
[ -z "$showmenu" ] && showmenu="no"
-cat > /root/.showfuelmenu << EOF
+
+# Pause during bootstrap_admin_node to wait for external config
+[ -z "$wait_for_external_config" ] && wait_for_external_config="no"
+
+
+# Prepare bootstrap_admin_node config
+cat > /etc/fuel/bootstrap_admin_node.conf << EOF
#Set to yes to run Fuel Setup
#Set to no to accept default settings
-showmenu=$showmenu
+ADMIN_INTERFACE=${admin_interface}
+showmenu=${showmenu}
+wait_for_external_config=${wait_for_external_config}
EOF
# Prepare custom /etc/issue logon banner and script for changing IP in it
@@ -522,7 +532,7 @@ cat > /etc/issue << EOF
Server is running on \m platform
Fuel UI is available on:
-http://:8000
+https://:8443
Default administrator login: root
Default administrator password: r00tme
@@ -539,17 +549,17 @@ cat >> '/etc/rc.local' << EOF
first=yes
for ip in \$(ip -o -4 addr | grep "eth." | awk '{print \$4 }' | cut -d/ -f1); do
if [ "\$first" = "yes" ]; then
- ipstr="Fuel UI is available on: http://\$ip:8000"
+ ipstr="Fuel UI is available on: https://\$ip:8443"
first=no
else
- ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "http://\$ip:8000")
+ ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "https://\$ip:8443")
fi
done
tmpissue=\$(mktemp)
while read -r line; do
if [[ "\$line" =~ "Fuel UI is available on" ]]; then
echo -e "\$ipstr" >> \$tmpissue
- elif [[ "\$line" =~ :8000$ ]]; then
+ elif [[ "\$line" =~ :8443$ ]]; then
:
else
echo -e "\$line" >> \$tmpissue
diff --git a/fuel/build/f_isoroot/f_kscfg/ks.cfg.orig b/fuel/build/f_isoroot/f_kscfg/ks.cfg.orig
index cf8cf80d1..c284d813a 100644
--- a/fuel/build/f_isoroot/f_kscfg/ks.cfg.orig
+++ b/fuel/build/f_isoroot/f_kscfg/ks.cfg.orig
@@ -251,8 +251,9 @@ daemonize
dhcp
docker-io
fuel-bootstrap-image
+fuel-bootstrap-image-builder
fuel-createmirror
-fuel-target-centos-images
+fuel-target-centos-images6.6
fuel-package-updates
fuelmenu
fuel-docker-images
@@ -328,7 +329,7 @@ esac
set -x
function save_cfg {
- scrFile="/etc/sysconfig/network-scripts/ifcfg-$device"
+ scrFile="/etc/sysconfig/network-scripts/ifcfg-$admin_interface"
search="domain $domain\nsearch $domain"
sed -i -e 's#^\(HOSTNAME=\).*$#\1'"$hostname"'#' /etc/sysconfig/network
grep -q "^\s*$ip\s+$hostname" /etc/hosts || echo "$ip $hostname" >> /etc/hosts
@@ -338,7 +339,7 @@ function save_cfg {
[ $dns2 ] && echo "nameserver $dns2" >> /etc/resolv.conf
[ $dns2 ] && echo "nameserver $dns2" >> /etc/dnsmasq.upstream
- echo DEVICE=$device > $scrFile
+ echo DEVICE=$admin_interface > $scrFile
echo ONBOOT=yes >> $scrFile
echo NM_CONTROLLED=no >> $scrFile
echo HWADDR=$hwaddr >> $scrFile
@@ -353,7 +354,7 @@ function save_cfg {
fi
scrDHCPFile="/etc/sysconfig/network-scripts/ifcfg-$dhcp_interface"
#Ignore gateway and set up DHCP if it is used, otherwise apply it
- if [ $dhcp_interface ] && [ "$dhcp_interface" != "$device" ]; then
+ if [ $dhcp_interface ] && [ "$dhcp_interface" != "$admin_interface" ]; then
echo "DEVICE=$dhcp_interface" > $scrDHCPFile
echo "BOOTPROTO=dhcp" >> $scrDHCPFile
echo "ONBOOT=yes" >> $scrDHCPFile
@@ -373,10 +374,11 @@ domain=${hostname#*.}
ip=$ip
netmask=$netmask
gw=$gw
-device="eth0"
-hwaddr=`ifconfig $device | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
+admin_interface=${admin_interface:-"eth0"}
+hwaddr=`ifconfig $admin_interface | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
dhcp_interface=$dhcp_interface
build_images=$build_images
+wait_for_external_config=$wait_for_external_config
save_cfg
# Mounting installation source
@@ -484,7 +486,7 @@ on master node and change default repository settings:
* Ubuntu: fuel-createmirror (see --help for options)
Please refer to the following guide for more information:
-https://docs.mirantis.com/openstack/fuel/fuel-6.1/reference-architecture.html#fuel-rep-mirror
+https://docs.mirantis.com/openstack/fuel/fuel-7.0/reference-architecture.html#fuel-rep-mirror
EOF
@@ -506,12 +508,20 @@ cp ${SOURCE}/version.yaml /etc/fuel/release_versions/`cat ${SOURCE}/openstack_v
# Generete Fuel UUID
uuidgen > /etc/fuel/fuel-uuid
-###Run fuel menu
+# Run fuel menu
[ -z "$showmenu" ] && showmenu="no"
-cat > /root/.showfuelmenu << EOF
+
+# Pause during bootstrap_admin_node to wait for external config
+[ -z "$wait_for_external_config" ] && wait_for_external_config="no"
+
+
+# Prepare bootstrap_admin_node config
+cat > /etc/fuel/bootstrap_admin_node.conf << EOF
#Set to yes to run Fuel Setup
#Set to no to accept default settings
-showmenu=$showmenu
+ADMIN_INTERFACE=${admin_interface}
+showmenu=${showmenu}
+wait_for_external_config=${wait_for_external_config}
EOF
# Prepare custom /etc/issue logon banner and script for changing IP in it
@@ -522,7 +532,7 @@ cat > /etc/issue << EOF
Server is running on \m platform
Fuel UI is available on:
-http://:8000
+https://:8443
Default administrator login: root
Default administrator password: r00tme
@@ -539,17 +549,17 @@ cat >> '/etc/rc.local' << EOF
first=yes
for ip in \$(ip -o -4 addr | grep "eth." | awk '{print \$4 }' | cut -d/ -f1); do
if [ "\$first" = "yes" ]; then
- ipstr="Fuel UI is available on: http://\$ip:8000"
+ ipstr="Fuel UI is available on: https://\$ip:8443"
first=no
else
- ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "http://\$ip:8000")
+ ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "https://\$ip:8443")
fi
done
tmpissue=\$(mktemp)
while read -r line; do
if [[ "\$line" =~ "Fuel UI is available on" ]]; then
echo -e "\$ipstr" >> \$tmpissue
- elif [[ "\$line" =~ :8000$ ]]; then
+ elif [[ "\$line" =~ :8443$ ]]; then
:
else
echo -e "\$line" >> \$tmpissue
diff --git a/fuel/build/f_isoroot/f_repobuild/Makefile b/fuel/build/f_isoroot/f_repobuild/Makefile
index 0f5a6ac12..d7db2dd90 100644
--- a/fuel/build/f_isoroot/f_repobuild/Makefile
+++ b/fuel/build/f_isoroot/f_repobuild/Makefile
@@ -30,16 +30,16 @@ nailgun:
rm -rf tmpiso tmpdir
mkdir tmpiso
fuseiso ${ISOCACHE} tmpiso
- cp tmpiso/ubuntu/pool/main/f/fuel-createmirror/fuel-createmirror_6.1*.deb .
+ cp tmpiso/ubuntu/pool/main/f/fuel-createmirror/fuel-createmirror_*.deb .
fusermount -u tmpiso
rm -rf tmpiso
- sudo dpkg -i fuel-createmirror_6.1*.deb
+ sudo dpkg -i fuel-createmirror_*.deb
sudo sed -i 's/DOCKER_MODE=true/DOCKER_MODE=false/' /etc/fuel-createmirror/common.cfg
sudo sed -i 's/DEBUG="no"/DEBUG="yes"/' /etc/fuel-createmirror/ubuntu.cfg
sudo sed -i "s/MIRROR_UBUNTU_HOST=\".*\"/MIRROR_UBUNTU_HOST=\"$(RSYNC_HOST)\"/" /etc/fuel-createmirror/common.cfg
rm -Rf nailgun
sudo mkdir -p /var/www
- sudo su - -c /opt/fuel-createmirror-6.1/fuel-createmirror
+ sudo su - -c /opt/fuel-createmirror-*/fuel-createmirror
sudo chmod -R 755 /var/www/nailgun
cp -Rp /var/www/nailgun .
diff --git a/fuel/build/fuel-main_3.patch b/fuel/build/fuel-main_3.patch
deleted file mode 100644
index 8341d72d6..000000000
--- a/fuel/build/fuel-main_3.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-*** prepare-build-env.sh.orig Tue Sep 8 08:47:46 2015
---- prepare-build-env.sh Tue Sep 8 08:48:22 2015
-***************
-*** 41,47 ****
-
- trusty)
- GEMPKG="ruby ruby-dev"
-! sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D5A05778
- echo "deb http://mirror.fuel-infra.org/devops/ubuntu/ ./" | sudo tee /etc/apt/sources.list.d/fuel-devops.list
- sudo apt-get update && sudo apt-get -y install nodejs nodejs-legacy npm
- ;;
---- 41,47 ----
-
- trusty)
- GEMPKG="ruby ruby-dev"
-! sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 1D2B45A2
- echo "deb http://mirror.fuel-infra.org/devops/ubuntu/ ./" | sudo tee /etc/apt/sources.list.d/fuel-devops.list
- sudo apt-get update && sudo apt-get -y install nodejs nodejs-legacy npm
- ;;