aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-12-18 14:48:26 +0800
committerbaigk <baiguoku@huawei.com>2015-12-22 04:57:11 +0000
commit5e3b598f5999a7ab6d49cb294d8e5514003ae20c (patch)
tree0bfaf0a566c523380aeaa7e255e0e26103e92e6c
parent8375e207ff0e79abe1db56733c9b4da433fc7791 (diff)
install compass-core in centos7
JIRA: COMPASS-208 Change-Id: Ie98615df37115beaa0ad8f744cc87162452af751 Signed-off-by: baigk <baiguoku@huawei.com>
-rwxr-xr-xbuild.sh2
-rw-r--r--build/arch/RedHat/make_kibana.sh1
-rw-r--r--build/build.conf6
-rwxr-xr-xbuild/make_repo.sh42
-rw-r--r--build/templates/compass_core.tmpl47
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/nfs.yml11
-rw-r--r--deploy/adapters/ansible/roles/glance/vars/Debian.yml5
-rw-r--r--deploy/adapters/ansible/roles/glance/vars/RedHat.yml4
-rw-r--r--deploy/compass_vm.sh1
-rw-r--r--deploy/conf/base.conf2
-rw-r--r--deploy/conf/cluster.conf2
-rw-r--r--deploy/conf/virtual.conf2
-rw-r--r--util/isolinux.cfg122
-rw-r--r--util/ks.cfg133
14 files changed, 229 insertions, 151 deletions
diff --git a/build.sh b/build.sh
index 988ddae7..d3bc3f28 100755
--- a/build.sh
+++ b/build.sh
@@ -92,8 +92,6 @@ function copy_file()
mkdir -p $new/compass $new/bootstrap $new/pip $new/guestimg $new/app_packages $new/ansible
mkdir -p $new/repos/cobbler/{ubuntu,centos}/{iso,ppa}
- cp -rf $SCRIPT_DIR/util/ks.cfg $new/isolinux/ks.cfg
-
rm -rf $new/.rr_moved
if [[ $UBUNTU_ISO ]]; then
diff --git a/build/arch/RedHat/make_kibana.sh b/build/arch/RedHat/make_kibana.sh
index 51af5209..95047022 100644
--- a/build/arch/RedHat/make_kibana.sh
+++ b/build/arch/RedHat/make_kibana.sh
@@ -48,5 +48,4 @@ rpmbuild -bb rpmbuild/SPECS/kibana.spec
cp -rf rpmbuild/RPMS/* /var/cache/yum/
-find /var/cache/yum -name "perl*" | xargs rm -rf
popd
diff --git a/build/build.conf b/build/build.conf
index 4865eb6a..86154a1f 100644
--- a/build/build.conf
+++ b/build/build.conf
@@ -2,17 +2,17 @@ TIMEOUT=10
export PACKAGE_URL=${PACKAGE_URL:-http://205.177.226.235:9999}
#begin: package download
-export CENTOS_BASE=${CENTOS_BASE:-$PACKAGE_URL/centos_base.iso}
+export CENTOS_BASE=${CENTOS_BASE:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1511.iso}
export COMPASS_CORE=${COMPASS_CORE:-https://github.com/openstack/compass-core.git}
export COMPASS_WEB=${COMPASS_WEB:-http://github.com/baigk/compass-web.git}
export COMPASS_INSTALL=${COMPASS_INSTALL:-http://github.com/baigk/compass-install.git}
export UBUNTU_ISO=${UBUNTU_ISO:-$PACKAGE_URL/ubuntu-14.04.3-server-amd64.iso}
export TRUSTY_JUNO_PPA=${TRUSTY_JUNO_PPA:-$PACKAGE_URL/trusty-juno-ppa.tar.gz}
export TRUSTY_LIBERTY_PPA=${TRUSTY_LIBERTY_PPA:-$PACKAGE_URL/trusty-liberty-ppa.tar.gz}
-export CENTOS_ISO=${CENTOS_ISO:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1503-01.iso}
+export CENTOS_ISO=${CENTOS_ISO:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1511.iso}
export CENTOS7_JUNO_PPA=${CENTOS7_JUNO_PPA:-$PACKAGE_URL/centos7-juno-ppa.tar.gz}
#export CENTOS7_KILO_PPA=${CENTOS7_KILO_PPA:-$PACKAGE_URL/centos7-kilo-ppa.tar.gz}
-export COMPASS_PKG=${COMPASS_PKG:-$PACKAGE_URL/centos6-package.tar.gz}
+export COMPASS_PKG=${COMPASS_PKG:-$PACKAGE_URL/centos7-compass-core.tar.gz}
export LOADERS=${LOADERS:-$PACKAGE_URL/loaders.tar.gz}
export CIRROS=${CIRROS:-$PACKAGE_URL/cirros-0.3.3-x86_64-disk.img}
export APP_PACKAGE=${APP_PACKAGE:-$PACKAGE_URL/packages.tar.gz}
diff --git a/build/make_repo.sh b/build/make_repo.sh
index c4afd4fa..f5c78d40 100755
--- a/build/make_repo.sh
+++ b/build/make_repo.sh
@@ -23,24 +23,6 @@ set -ex
cp /*.tar.gz /result -f
EOF
-cat << EOF >${WORK_PATH}/work/repo/elasticsearch.repo
-[elasticsearch-2.x]
-name=Elasticsearch repository for 2.x packages
-baseurl=http://packages.elastic.co/elasticsearch/2.x/centos
-gpgcheck=1
-gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
-enabled=1
-EOF
-
-cat << EOF > ${WORK_PATH}/work/repo/logstash.repo
-[logstash-2.0]
-name=Logstash repository for 2.0.x packages
-baseurl=http://packages.elastic.co/logstash/2.0/centos
-gpgcheck=1
-gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
-enabled=1
-EOF
-
sudo apt-get install python-yaml -y
sudo apt-get install python-cheetah -y
}
@@ -179,9 +161,13 @@ function make_all_repo()
{
make_repo --package-tag pip
- make_repo --os-ver rhel6 --package-tag compass \
+ make_repo --os-ver rhel7 --package-tag compass \
--tmpl "${WORK_PATH}/build/templates/compass_core.tmpl" \
- --default-package "epel-release python-yaml python-jinja2 python-paramiko elasticsearch logstash" \
+ --default-package "kernel-devel epel-release wget libxml2 glibc gcc perl openssl-libs mkisofs createrepo \
+ python-yaml python-jinja2 python-paramiko elasticsearch logstash bind-license \
+ yum cobbler cobbler-web createrepo mkisofs syslinux pykickstart bind rsync fence-agents \
+ dhcp xinetd tftp-server httpd libselinux-python python-setuptools python-devel mysql-devel \
+ mysql-server mysql MySQL-python redis mod_wsgi net-tools rabbitmq-server nfs-utils" \
--special-package "kibana jdk"
make_repo --os-ver trusty --package-tag juno \
@@ -201,11 +187,13 @@ function make_all_repo()
make_repo --os-ver rhel7 --package-tag juno \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
- --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.3 dracut-network-033-241.el7_1.3"
+ --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server \
+ dracut-config-rescue-033-241.el7_1.3 dracut-network-033-241.el7_1.3"
make_repo --os-ver rhel7 --package-tag kilo \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
- --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.5 dracut-network-033-241.el7_1.5"
+ --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server \
+ dracut-config-rescue-033-241.el7_1.5 dracut-network-033-241.el7_1.5"
}
function main()
@@ -214,16 +202,6 @@ function main()
if [[ $# -eq 0 ]]; then
make_all_repo
- elif [ "$1" = "rhel7" ]; then
- echo "make rhel7"
- make_repo --os-ver rhel7 --package-tag juno \
- --ansible-dir $WORK_PATH/deploy/adapters/ansible \
- --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.3 dracut-network-033-241.el7_1.3"
- elif [ "$1" = "rhel6" ]; then
- make_repo --os-ver rhel6 --package-tag compass \
- --tmpl "${WORK_PATH}/build/templates/compass_core.tmpl" \
- --default-package "epel-release python-yaml python-jinja2 python-paramiko elasticsearch logstash" \
- --special-package "kibana jdk"
else
make_repo $*
fi
diff --git a/build/templates/compass_core.tmpl b/build/templates/compass_core.tmpl
index afecba58..1cb34b49 100644
--- a/build/templates/compass_core.tmpl
+++ b/build/templates/compass_core.tmpl
@@ -1,23 +1,42 @@
#!/bin/bash
set -x
-yum install tar -y
+
+# add openstack kilo repo
+yum install http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm -y
+yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -y
+
+cat << EOF >/etc/yum.repos.d/elasticsearch.repo
+[elasticsearch-2.x]
+name=Elasticsearch repository for 2.x packages
+baseurl=http://packages.elastic.co/elasticsearch/2.x/centos
+gpgcheck=1
+gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
+enabled=1
+EOF
+
+cat << EOF >/etc/yum.repos.d/logstash.repo
+[logstash-2.0]
+name=Logstash repository for 2.0.x packages
+baseurl=http://packages.elastic.co/logstash/2.0/centos
+gpgcheck=1
+gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
+enabled=1
+EOF
+
+yum update -y
+
+mkdir -p /centos7-compass-core
+yum -y reinstall bind-license --downloadonly --downloaddir=/centos7-compass-core
+yum -y reinstall openssl-libs --downloadonly --downloaddir=/centos7-compass-core
#download packages
#set packages = $getVar('default_packages', [])
-#for pkg in $packages
-yum -y install $pkg
-#end for
+yum -y install --skip-broken --downloadonly --downloaddir=/centos7-compass-core #echo ' '.join(packages)
#set packages = $getVar('packages', [])
-#for pkg in $packages
-yum -y install $pkg
-#end for
-
+yum -y install --skip-broken --downloadonly --downloaddir=/centos7-compass-core #echo ' '.join(packages)
#make repo
-mkdir -p /centos6-package
-
-find /var/cache/yum/ -name "*.rpm" | xargs -i cp {} /centos6-package
+find /var/cache/yum/ -name "*.rpm" | xargs -i cp {} /centos7-compass-core
-find /centos6-package -size 0 -name "*.rpm" | xargs rm -f
-
-tar -zcvf /centos6-package.tar.gz /centos6-package
+yum install tar -y
+tar -zcvf /centos7-compass-core.tar.gz /centos7-compass-core
diff --git a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
index ff96c64a..ff72ecb7 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
@@ -1,10 +1,9 @@
---
-- name: install packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: nfs_packages
-
- name: install nfs
- local_action: yum name=nfs-utils state=present
+ local_action: yum name={{ item }} state=present
+ with_items:
+ - rpcbind
+ - nfs-utils
run_once: True
- name: create image directory
@@ -21,7 +20,7 @@
local_action: service name={{ item }} state=restarted enabled=yes
with_items:
- rpcbind
- - nfs
+ - nfs-server
run_once: True
- name: get mount info
diff --git a/deploy/adapters/ansible/roles/glance/vars/Debian.yml b/deploy/adapters/ansible/roles/glance/vars/Debian.yml
index 974ada23..e7fe2da7 100644
--- a/deploy/adapters/ansible/roles/glance/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/glance/vars/Debian.yml
@@ -1,12 +1,9 @@
---
-
packages:
- glance
-nfs_packages:
- - nfs-common
-
nfs_services: []
+
services:
- glance-registry
- glance-api
diff --git a/deploy/adapters/ansible/roles/glance/vars/RedHat.yml b/deploy/adapters/ansible/roles/glance/vars/RedHat.yml
index bd80d21d..fbf77833 100644
--- a/deploy/adapters/ansible/roles/glance/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/glance/vars/RedHat.yml
@@ -2,10 +2,6 @@
packages:
- openstack-glance
-nfs_packages:
- - nfs-utils
- - rpcbind
-
nfs_services:
- rpcbind
- rpc-statd
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index 958bf33b..71d9ad6c 100644
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -67,6 +67,7 @@ function launch_compass() {
chmod 755 -R $new_mnt
cp $COMPASS_DIR/util/isolinux.cfg $new_mnt/isolinux/ -f
+ cp $COMPASS_DIR/util/ks.cfg $new_mnt/isolinux/ -f
sed -i -e "s/REPLACE_MGMT_IP/$MGMT_IP/g" \
-e "s/REPLACE_MGMT_NETMASK/$MGMT_MASK/g" \
diff --git a/deploy/conf/base.conf b/deploy/conf/base.conf
index 45970a05..440b3e03 100644
--- a/deploy/conf/base.conf
+++ b/deploy/conf/base.conf
@@ -12,7 +12,7 @@ export MGMT_IP_END=${MGMT_IP_END:-192.168.200.254}
export EXTERNAL_NIC=${EXTERNAL_NIC:-eth0}
export CLUSTER_NAME="opnfv2"
export DOMAIN="ods.com"
-export PARTITIONS="/=70%,/home=5%,/tmp=5%,/var=20%"
+export PARTITIONS="/=30%,/home=5%,/tmp=5%,/var=60%"
export SUBNETS="10.1.0.0/24,172.16.2.0/24,172.16.3.0/24,172.16.4.0/24"
export MANAGEMENT_IP_START=${MANAGEMENT_IP_START:-'10.1.0.50'}
diff --git a/deploy/conf/cluster.conf b/deploy/conf/cluster.conf
index f5ccdf30..f741895b 100644
--- a/deploy/conf/cluster.conf
+++ b/deploy/conf/cluster.conf
@@ -1,6 +1,6 @@
# for Operating System
export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)ubuntu-14\.04\.3.*'}
-#export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)CentOS-7.*1503-01.*'}
+#export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)CentOS-7.*15.*'}
# trustry/centos7
export OS_VERSION=${OS_VERSION:-"trusty"}
diff --git a/deploy/conf/virtual.conf b/deploy/conf/virtual.conf
index 0dbdb28b..611aca76 100644
--- a/deploy/conf/virtual.conf
+++ b/deploy/conf/virtual.conf
@@ -1,7 +1,7 @@
export VIRT_NUMBER=5
export VIRT_CPUS=4
export VIRT_MEM=16384
-export VIRT_DISK=30G
+export VIRT_DISK=50G
export SWITCH_IPS="1.1.1.1"
export SWITCH_CREDENTIAL="version=2c,community=public"
diff --git a/util/isolinux.cfg b/util/isolinux.cfg
index ca612f77..b4f637da 100644
--- a/util/isolinux.cfg
+++ b/util/isolinux.cfg
@@ -1,40 +1,120 @@
default vesamenu.c32
-#prompt 1
-timeout 15
+timeout 1
display boot.msg
-menu background splash.jpg
-menu title Welcome to CentOS 6.5!
-menu color border 0 #ffffffff #00000000
-menu color sel 7 #ffffffff #ff000000
-menu color title 0 #ffffffff #00000000
-menu color tabmsg 0 #ffffffff #00000000
-menu color unsel 0 #ffffffff #00000000
-menu color hotsel 0 #ff000000 #ffffffff
-menu color hotkey 7 #ffffffff #ff000000
-menu color scrollbar 0 #ffffffff #00000000
+# Clear the screen when exiting the menu, instead of leaving the menu displayed.
+# For vesamenu, this means the graphical background is still displayed without
+# the menu itself for as long as the screen remains in graphics mode.
+menu clear
+menu background splash.png
+menu title CentOS 7
+menu vshift 8
+menu rows 18
+menu margin 8
+#menu hidden
+menu helpmsgrow 15
+menu tabmsgrow 13
+
+# Border Area
+menu color border * #00000000 #00000000 none
+
+# Selected item
+menu color sel 0 #ffffffff #00000000 none
+
+# Title bar
+menu color title 0 #ff7ba3d0 #00000000 none
+
+# Press [Tab] message
+menu color tabmsg 0 #ff3a6496 #00000000 none
+
+# Unselected menu item
+menu color unsel 0 #84b8ffff #00000000 none
+
+# Selected hotkey
+menu color hotsel 0 #84b8ffff #00000000 none
+
+# Unselected hotkey
+menu color hotkey 0 #ffffffff #00000000 none
+
+# Help text
+menu color help 0 #ffffffff #00000000 none
+
+# A scrollbar of some type? Not sure.
+menu color scrollbar 0 #ffffffff #ff355594 none
+
+# Timeout msg
+menu color timeout 0 #ffffffff #00000000 none
+menu color timeout_msg 0 #ffffffff #00000000 none
+
+# Command prompt text
+menu color cmdmark 0 #84b8ffff #00000000 none
+menu color cmdline 0 #ffffffff #00000000 none
+
+# Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message.
+
+menu tabmsg Press Tab for full configuration options on menu items.
+
+menu separator # insert an empty line
+menu separator # insert an empty line
label linux
- menu label ^Install or upgrade an existing system
+ menu label ^Install CentOS 7
menu default
kernel vmlinuz
append ks=cdrom:/isolinux/ks.cfg initrd=initrd.img mgmt_ip=REPLACE_MGMT_IP mgmt_netmask=REPLACE_MGMT_NETMASK install_ip=REPLACE_INSTALL_IP install_netmask=REPLACE_INSTALL_NETMASK gw=REPLACE_GW external_ip=REPLACE_COMPASS_EXTERNAL_IP external_mask=REPLACE_COMPASS_EXTERNAL_NETMASK external_gw=REPLACE_COMPASS_EXTERNAL_GW dns1=REPLACE_COMPASS_DNS1 dns2=REPLACE_COMPASS_DNS2
+label check
+ menu label Test this ^media & install CentOS 7
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rd.live.check quiet
+
+menu separator # insert an empty line
+
+# utilities submenu
+menu begin ^Troubleshooting
+ menu title Troubleshooting
label vesa
- menu label Install system with ^basic video driver
+ menu indent count 5
+ menu label Install CentOS 7 in ^basic graphics mode
+ text help
+ Try this option out if you're having trouble installing
+ CentOS 7.
+ endtext
kernel vmlinuz
- append initrd=initrd.img xdriver=vesa nomodeset
+ append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 xdriver=vesa nomodeset quiet
+
label rescue
- menu label ^Rescue installed system
+ menu indent count 5
+ menu label ^Rescue a CentOS system
+ text help
+ If the system will not boot, this lets you access files
+ and edit config files to try to get it booting again.
+ endtext
kernel vmlinuz
- append initrd=initrd.img rescue
+ append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rescue quiet
+
+label memtest
+ menu label Run a ^memory test
+ text help
+ If your system is having issues, a problem with your
+ system's memory may be the cause. Use this utility to
+ see if the memory is working correctly.
+ endtext
+ kernel memtest
+
+menu separator # insert an empty line
+
label local
menu label Boot from ^local drive
localboot 0xffff
-label memtest86
- menu label ^Memory test
- kernel memtest
- append -
+menu separator # insert an empty line
+menu separator # insert an empty line
+
+label returntomain
+ menu label Return to ^main menu
+ menu exit
+
+menu end
diff --git a/util/ks.cfg b/util/ks.cfg
index 9e33f42f..dd31d8fd 100644
--- a/util/ks.cfg
+++ b/util/ks.cfg
@@ -1,27 +1,70 @@
+#version=DEVEL
+# System authorization information
+auth --useshadow --enablemd5
+# Install OS instead of upgrade
install
+# License agreement
+eula --agreed
+# Use text mode install
text
-cdrom
-reboot --eject
+# Firewall configuration
+firewall --disabled
+firstboot --disable
+# Keyboard layouts
+# old format: keyboard us
+# new format:
+keyboard --vckeymap=us --xlayouts='us'
+network --onboot no --device eth0 --bootproto dhcp --noipv6
+network --onboot no --device eth1 --bootproto dhcp --noipv6
+network --onboot no --device eth2 --bootproto dhcp --noipv6
+# System language
lang en_US.UTF-8
-keyboard us
+# Installation logging level
+logging --level=info
+# Reboot after installation
+reboot
+# Root password
rootpw root
-timezone --utc Etc/UTC
-firewall --disabled
+# SELinux configuration
selinux --disabled
-unsupported_hardware
+# System services
+services --enabled="NetworkManager,sshd"
+# Do not configure the X Window System
skipx
+# System timezone
+timezone America/Los_Angeles --isUtc
+# System bootloader configuration
+bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
+# Clear the Master Boot Record
+zerombr
+# Partition clearing information
+clearpart --all --initlabel
+# Disk partitioning information
+part swap --asprimary --fstype="swap" --ondisk=sda --size=3072
+part /boot --asprimary --fstype="ext3" --ondisk=sda --size=500
+part pv.64 --fstype="lvmpv" --ondisk=sda --size=27145
+volgroup os --pesize=4096 pv.64
+logvol /var --fstype="ext3" --grow --percent=40 --name=varvol --vgname=os
+logvol /tmp --fstype="ext3" --grow --percent=5 --name=tmpvol --vgname=os
+logvol / --fstype="ext3" --grow --percent=50 --name=rootvol --vgname=os
+logvol /home --fstype="ext3" --grow --percent=5 --name=homevol --vgname=os
-# NEVER ever place zerombr here, it breaks automated installation
-%include /tmp/bootloader.ks
-%include /tmp/partition.ks
-
-# PREINSTALL SECTION
-# HERE ARE COMMANDS THAT WILL BE LAUNCHED BEFORE
-# INSTALLATION PROCESS ITSELF
%pre
#!/bin/sh
-# hard drives
+set -x -v
+exec 1>/tmp/ks-pre.log 2>&1
+# Once root's homedir is there, copy over the log.
+while : ; do
+ sleep 10
+ if [ -d /mnt/sysimage/root ]; then
+ cp /tmp/ks-pre.log /mnt/sysimage/root/
+ logger "Copied %pre section log to system"
+ break
+ fi
+done &
+
+# hard drivedd
drives=(`ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`)
default_drive=${drives[0]}
@@ -94,60 +137,30 @@ echo "logvol /var/log --vgname=os --size=4096 --percent 40 --grow --name=varlog
echo "bootloader --location=mbr --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks
%end
-%packages --nobase --excludedocs
-wget
-git
-yum
-cobbler
-cobbler-web
-createrepo
-mkisofs
-syslinux
-debmirror
-pykickstart
-cman
-bind
-rsync
-dhcp
-xinetd
-tftp-server
-gcc
-httpd
-libselinux-python
-python-setuptools
-python-devel
-mysql-devel
-mysql-server
-mysql
-MySQL-python
-redis
-mod_wsgi
-rabbitmq-server
-nfs-utils
-
%post
echo -e "modprobe nf_conntrack_ipv4\nmodprobe nf_conntrack_ipv6\nmodprobe nf_conntrack_tftp\nmodprobe nf_nat_tftp" >> /etc/rc.modules
chmod +x /etc/rc.modules
echo -e "net.nf_conntrack_max=1048576" >> /etc/sysctl.conf
mkdir -p /var/log/coredump
echo -e "kernel.core_pattern=/var/log/coredump/core.%e.%p.%h.%t" >> /etc/sysctl.conf
+
chmod 777 /var/log/coredump
echo -e "* soft core unlimited\n* hard core unlimited" >> /etc/security/limits.conf
+%end
-########################### post install before chroot ####################
-%post --nochroot --log=/mnt/sysimage/root/anaconda-post-before-chroot.log
+%post --nochroot --log=/root/anaconda-post-before-chroot.log
#!/bin/sh
set -x
SOURCE="/mnt/sysimage/tmp/source"
for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
mkdir -p "${SOURCE}"
-mount -o bind "/mnt/source" "${SOURCE}"
+mount -o bind "/mnt/install/source" "${SOURCE}"
+%end
-########################### post install after chroot ####################
-%post --log=/root/anaconda-post-after-chroot.log
-#!/bin/bash
-set -x
+%post --logfile /var/log/post_install.log
+set -x -v
+exec 1>/root/ks-post.log 2>&1
function save_nic_cfg() {
scrFile="/etc/sysconfig/network-scripts/ifcfg-$1"
@@ -197,31 +210,29 @@ ex_gw=$external_gw
install_ip=$install_ip
install_netmask=$install_netmask
install_intf="eth1"
-install_hwaddr=`ifconfig $install_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
+#install_hwaddr=`ifconfig $install_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
save_nic_cfg $install_intf $install_ip $install_netmask $install_hwaddr
mgmt_ip=$mgmt_ip
mgmt_netmask=$mgmt_netmask
mgmt_intf="eth0"
-mgmt_hwaddr=`ifconfig $mgmt_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
+#mgmt_hwaddr=`ifconfig $mgmt_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
save_nic_cfg $mgmt_intf $mgmt_ip $mgmt_netmask $mgmt_hwaddr
external_ip=$external_ip
external_netmask=$external_mask
external_intf="eth2"
-external_hwaddr=`ifconfig $external_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
+#external_hwaddr=`ifconfig $external_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
save_nic_cfg $external_intf $external_ip $external_netmask $external_hwaddr
save_gateway
-# already chroot
SOURCE=/tmp/source
FS=/tmp/fs
-echo
mkdir -p ${SOURCE}
mkdir -p ${FS}
@@ -229,7 +240,6 @@ repodir="/var/lib/install_iso"
# Copying Centos files
mkdir -p ${repodir}
-cp -r ${SOURCE} ${repodir}/source
cp -rf ${SOURCE} ${repodir}/source
rm -rf ${repodir}/source/bootstrap/ \
@@ -247,9 +257,6 @@ cp -rf ${SOURCE}/repos/cobbler/* /opt/cobbler/
cp -rf ${SOURCE}/ansible/* /opt
cp -rf ${SOURCE}/repos/* /opt
cp -rf ${SOURCE}/loaders.tar.gz /opt
-
-mkdir -p /var/www
-
cp -rf ${SOURCE}/pip /var/www/pip
cp -rf ${SOURCE}/guestimg /var/www/guestimg
@@ -270,5 +277,9 @@ sed -i 's/Defaults requiretty/#Defaults requiretty/g' /etc/sudoers
sed -i 's/^UseDNS/#UseDNS/g' /etc/ssh/sshd_config
echo "UseDNS no" >> /etc/ssh/sshd_config
+# End post_install_network_config generated code
%end
+%packages --nobase
+@core
+%end