Commit 903d7a14 authored by Peter Niederlag's avatar Peter Niederlag
Browse files

Merge branch 'release/1.0.0'

* release/1.0.0:
  bump version 1.0.0
  update README
  use /root/machine.conf
  update README
  improve doc/README
  set virtio model and bus
  update doc block
  document bootstrap
  add curl bug to README
  update README
  ipv6 and ipv4 impossible via preseed
  adapt for srv167
  IP config for srv168
  update ToDo
  update ToDo
  update ToDo
parents 35862535 4265cf2f
have a look at the variables in virt-install-debian and adapt to your liking
On server
==============
edit /root/machine.conf and update variables
# kick installation
virt-install-debian
export DOMAIN=srvXXX
# login and create /root/.ssh
# install curl (until its part of base install)
# shutdown
virsh shutdown domain
virsh shutdown $DOMAIN
# copy ssh-keys of admins into machine
virt-copy-in -d domain authorized_keys /root/.ssh/
virt-copy-in -d $DOMAIN authorized_keys /root/.ssh/
# start again
virsh start $DOMAIN
# set domain to autostart
virsh autostart $DOMAIN
On your workstation (chef master node)
========================================
knife bootstrap --bootstrap-version 12.5.1 -N srvXXX.typo3.org -E production -r "recipe[t3-base]" -E production --ssh-user=root 46.4.xxx.yyy
# cleanup root/.ssh/authorized_keys
- add IPV6 support
- use encrypted root pw '$1$2nDbOTXS$yzM1ew/7KrdnPTfPVenPs0' instead of random string
- add curl/wget to standard install
- nail chef-client to 12.5.1 (if still required at all)
- add IPV6 support (hard/impossible via preseed)
- cleanup authorized_keys after installation
- improve scripts/configuration
- refactor to t3-guest-install
#!/bin/bash
SERVER_NAME="srv168"
NET_IPV4_MAC="00:50:56:00:59:07"
NET_IPV4_ADDRESS="46.4.110.203"
NET_IPV4_GATEWAY="46.4.110.201"
NET_IPV4_BROADCAST="46.4.110.207"
NET_IPV4_NETMASK="255.255.255.248"
HOST_NAME=$SERVER_NAME
#!/bin/bash
SERVER_NAME="srv168"
MACHINE_CONF_FILE="/root/machine.conf"
if [ ! -f "$MACHINE_CONF_FILE" ]; then
echo "you must supply the path to a config file"
exit 99
fi
source $MACHINE_CONF_FILE
# we should now have the following variables
echo "SERVER_NAME $SERVER_NAME"
echo "NET_IPV4_MAC $NET_IPV4_MAC"
echo "NET_IPV4_ADDRESS $NET_IPV4_ADDRESS"
echo "NET_IPV4_GATEWAY $NET_IPV4_GATEWAY"
echo "NET_IPV4_BROADCAST $NET_IPV4_BROADCAST"
echo "NET_IPV4_NETMASK $NET_IPV4_NETMASK"
read -p "Do you cant to creat a machine with this config? " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
exit 99
###########################################
###########################################
### ###
### no customisation below this point ###
### ###
###########################################
###########################################
NET_IPV4_MAC="00:50:56:00:59:07"
NET_IPV4_ADDRESS="46.4.110.203"
NET_IPV4_GATEWAY="46.4.110.201"
NET_IPV4_BROADCAST="46.4.110.207"
NET_IPV4_NETMASK="255.255.255.248"
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740895
#NET_IPV6_ADDRESS="2a01:4f8:141:21a3::3"
#NET_IPV6_NETMASK="64"
#NET_IPV6_GATEWAY="fe80::1"
HOST_NAME=$SERVER_NAME
######################################
# no customisation below this point
#######################################
SCRIPT_PATH=`dirname "$SCRIPT"`
# create passwd
......@@ -43,11 +71,11 @@ virt-install \
--connect qemu:///system \
--name $SERVER_NAME \
--ram 2048 \
--disk pool=vg1,size=50 \
--disk pool=vg1,size=50,bus=virtio \
--vcpus 2 \
--os-type linux \
--os-variant generic \
--network bridge=br0,mac=$NET_IPV4_MAC \
--network bridge=br0,mac=$NET_IPV4_MAC,model=virtio \
--graphics none \
--console pty,target_type=serial \
--location 'http://ftp.de.debian.org/debian/dists/jessie/main/installer-amd64/' \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment