NGCP metapackages depends on 'ssh' already. So no need to
install it during the debootstrap process. So far
deployment.sh is being used to recover from Puppet
(ssh module cares about 'openssh-server/-client already)
and also for Debian plain installation where we still need
to install 'openssh-server' manually.
Change-Id: If9c052f0517b1610f0e65ed4a574539b23e23928
The package 'gettext-base' is actually currenlty installed as a dependency:
> root@web01a:~# aptitude why gettext-base
> i grub-pc Depends grub-common (= 2.02~beta3-5)
> i A grub-common Depends gettext-base
Change-Id: If8224f0e67eb1ccdd38ee6523e3a20424e6fe2c3
Originally the code has been added back in 2014 with commit message:
> Support blade disks we have on our internal proxmox cluster
So far at the moment the package 'firmware-qlogic' is not installed on
internal Proxmox blades (as I can see). I would consider it as
unnecessary any more and remove it here. Also it is a bit dangerous to
install some packages on internal test servers only, as production might
behave the different way then. So good to remove it here.
Change-Id: I9817ca0904eade6c51479c72f4cff428a044896f
The package 'apt-transport-https' is available on freshly debootstrapped
Debian stretch already, also NGCP depends on it via ngcp-nth-*.
Additionaly ngcp-installer check 'apt-transport-https' availability in 'check.inc'.
Moreover we will have to remove it here after migration to Debian buster,
as 'apt-transport-https' has been merged into 'apt' there.
Change-Id: I263e9010093096d7b50bb92ae39a996dc4838755
If the systemd status is 'degraded' the exit code of the command
is not 0 so script is interrupted due to '-e' option.
Change-Id: I147da71569dc527004d598c48338fc04dd2ada92
All the services which are run within chroot are stopped when they
are not needed anymore. So it makes no sense trying to kill them
by list moreover the list is outdated.
Here is the ps output before and after these kills:
https://paste.mgm.sipwise.com/show/4107/
there is no services from chroot.
Add debug output of 'systemctl status' if someone uses mountpoint
$TARGET.
Change-Id: I90f0c18157040929aaa52ec572babea1b0bf2eb1
File /etc/network/interfaces is generated by ngcpcfg so deployment.sh
should not modify it further.
Remove unused variables.
Change-Id: I287b5e5bf32834309dc09efab637bf083f479d4c
Remove LVM variable and related code as deployment.sh is version specific
now and in mr6.4+ we definitely use ony LVM.
Change-Id: I1adad68a439ee5356d243f937f37197be1055156
Remove outdated checks of jessie release.
Some shellcheck improvements.
Remove PROFILE variable as it does not exist/used.
Remove outdated comments.
Change-Id: Ie77e9477f0b38019c2a62465426509cdfe6e309a
Collect the list of running process before and after kills in the end
of deployment to catch if we do not stop them properly.
Change-Id: Ie01853723d053a1ef198e47b89566bd4b9a93bbc
Use systemctl (reboot|poweroff) instead of sysrq triggers, we do not need
this workaround in a new grml.
Change-Id: I27d03a402e96e08c902f18eef91ae2144fe128fb
When all variables (DEBIAN|SIPWISE)_REPO_HOST, (DEBIAN|SIPWISE)_REPO_TRANSPORT
are set create and use (DEBIAN|SIPWISE)_URL variables to simplify and unify
their usage.
Change-Id: I2b4578efad0d285a5e5519cad8e5f78b870073a2
Remove workarounds which were used to install old debian releases/ngcp releases.
Remove old versions of Debian from installation list.
Add trailing space to the end of boot parameters to make manual modification
easier.
Change-Id: I201dac4a1d546a83743823cb9dff3546209e6404
Function checkBootParam is fuzzy about search pattern so it
returns false positive result on similar parameters, like 'ngcpppa'
and 'ngcpppainstaller'. It leds to incorrect call of getBootParam
on nonexistent parameter so it returns 1 which causes error exit
of deployment.sh due to 'set -e'.
Add '=' symbol to the end of search pattern for parameters with argument.
Change-Id: I636a66b3e74a395de33d4bdfa9b31eb07fbe03d0
Exporting HOSTNAME inside the loading 'boot parameters' section
causes the following issue (inside GRML chroot):
> (sp1)root@sp1:/# hostname --fqdn
> hostname: Name or service not known
NOTE: it happens if ngcphostname is not defined.
We should separate loading options and using them to
have clear system behaviour, so we move the export code forward.
In this case TARGET_HOSTNAME will be defined from options ngcpsp1/ngcpsp2
and 'export HOSTNAME="$TARGET_HOSTNAME"' will do the job even if
ngcphostname is not defined.
We should consider deprecating/removing 'ngcphostname' completely
if possible, as currently the option description is a bit confusing:
> ngcphostname=... - hostname of installed system (defaults to ngcp/sp[1,2])
> NOTE: do NOT use when installing Pro Edition!
(which says we should not use it on PRO, while PRO installation
cannot happens without ngcphostname option).
AFAIK, it is necessary for Carrier only, to define Carrier host name, like web01a.
Change-Id: Idba31fd8286d41bd0c1aaf7ee762371e6b1d50d5
Stop of mysql was added in the end of ngcp-installer in
installer.git:80ce05d706ed28e906d6b171498f3d2d9f55c84e
but mysql server is required for ngcp-prepare-translations so add
start/stop for this case.
Change-Id: Id0e030533240718517721d12647766eb283607bf
Add option -e to deplayment.sh to catch the installation's errors.
Run deployment.sh as a script not via external interpreter
'bash <name>'.
Change-Id: I320b535f41f08937c4924c603f8e1a17b23e80e8
Check dhclient process as well as boot parameter to decide if
dhcp should be used for external interface.
Change-Id: I5f92cca5a513edcacb99318b7b59d33c1fd55ef5
All used services in installer have to be manually stopped when
they aren't needed so we do not need such a stop cycle.
Moreover services with existing init.d script only can be stopped
in this way. Other services just produce error message:
Stopping <service name> ...
<service name>: unrecognized service
Change-Id: I9aec0b8aa7c4878e538532b9d8997e2438a1277f
fai-setup-storage has no real advantage over plain parted
usage for us nowadays, instead we can avoid depending on
it by using the plain tools.
For ngcp systems reproduce the same setup, for plain Debian
installations use a static size of 8GB for rootfs. This
makes installations more flexible for us.
Change-Id: I5e03ad0a5dd3dac7cc547b8cdc64277db4af4c22
We don't have einfo + eend available in deployment.sh as
we don't source lsb-functions
Change-Id: Ie07d67d105ec2bcb8849c7b04d3b99c7580d6de5
Thanks: Mykola Malkov for spotting this bug
The message `Started Cleanup of Temporary Directories` shows up
during deployment, caused by systemd-tmpfiles-clean.timer which
originally looks like:
[Timer]
OnBootSec=15min
OnUnitActiveSec=1d
To avoid this message to appear during deployment stage let's
disable the systemd timer by masking it.
NOTE: we might disable this timer on default Grml, but this
needs to be discussed yet in further detail and we need
a faster workaround anyway.
Thanks: Guillem Jover <gjover@sipwise.com> for the suggestion to just mask it
Change-Id: Ic85dc58322280f4eaece61af220ae00c64c74e52
There is no any source of mount info (mtab or /proc fs) so this
call is useless. Moreover due to absence of mount info it can catch
segfault:
117e8f0763
Change-Id: I0defcc8e6cb25c3534fef1f0281291c07e02f2d5
deployment.sh is release specific and GRML in trunk
provides grml-debootstrap version 0.81 already.
Change-Id: I193cb8412afb6a8984d5e8263fdaa8417aabbc14
Git is necessary for nightly puppet recovery tests while
it is missing on 'small' GRML we are currently using.
Also fix outdated debug message as it is confusing.
Change-Id: Ie4333eda2a7ef260456c63035c8084d921f0d366
There is problem with package 'moreutils' which contains 'ifdata'
so replace it with parsing of 'ip-address' output with 'sed'
Change-Id: Ic4af3e32b5cd36aa8efd706d21805acff7a50459
In 'small' GRML utils nmap, curl, ifdata are missing so replace them
with another ones and install required packages for installcd in
one place.
Change-Id: I7269bb53b66805c792f5e91ff97a2fd2ebd14d1f
We are based on the latest GRML nowadays which is based on Debian sid 2018-11-04.
apt-transport-https has been merged into apt package since version 1.5,
so far there is no need to install it manually, moreover sid contains
dummy transitional package 'apt-transport-https' which cause:
>> apt-get install apt-transport-https
> The following packages will be REMOVED:
> apt apt-utils tasksel tasksel-data
> The following NEW packages will be installed:
> apt-transport-https
> WARNING: The following essential packages will be removed.
> This should NOT be done unless you know exactly what you are doing!
> apt
> 0 upgraded, 1 newly installed, 4 to remove and 0 not upgraded.
> Need to get 171 kB of archives.
> After this operation, 5,342 kB disk space will be freed.
> You are about to do something potentially harmful.
> To continue type in the phrase 'Yes, do as I say!'
The fool protection is always good. Deleting manual apt-transport-https
installation from GRML part of deployment.sh
P.S. there is one more 'apt-transport-https' stay inside debootstrap,
as we use Debian stretch in NGCP currently while apt-transport-https
has been merged in Debian buster+, it should stay for a while.
Change-Id: Ifcf84f3d79ecc44465f97d42bbae12be04d8407e
We are in the process of removing the obsolete init scripts, so trying
to use them directly will make these operations not work at all.
Change-Id: Iba96fdb28e04f8b313ea03825b915ec4a8612351
Add network_configuration.sh which is just a wrapper for network configuration
Add netcardconfig with VLAN patch until newer grml image with patched
netcardconfig is used
Change-Id: I1f7bcd9a6dd7a92cede3caf0797eb9f15c252f95
We are going to provide common CE/PRO/Carrier install CD which
will install one release only. So deployment-iso.git will follow
the common NGCP branching/tagging model and will provide all the
necessary information inside Install CD (including deployment.sh
which previously was located into netscript.git).
Change-Id: Ia74d8c83f966237815b19a4a503183dfe85aa9d5
We cannot store the key inside 'include' folder,
otherwise the following deployment.sh migration
fails on docker unit-tests as it perform shellcheck
for all the scripts inside include folder.
Let's use separate 'keys' folder here.
Change-Id: If44a8838ca5542d01037ca7e7b72ba22b632c0b4
If Pro or Carrier version is chosen for installation - check if
deb.sipwise.com/sppro repo is accessible
Change-Id: I221c53c3dfce4b96792da116e13a00df26476f51
Use a single (prev CE like) approach
GRML -> main.sh -> deployment.sh -> ngcp-installer
All SP versions can be installed from a single image
Remove network configuration points from GRML installer
Change-Id: I9a56c12ca3f42d055303e5a0b08691de3560fe2c
This is Sipwise NGCP install CD. NGCP install options must be on top
(right after 'Rescue system boot').
Change-Id: Ie33e06e17f86bcb5633bed7c59bcd9a266201645
It is often outdated, see MT#19427 and confuses support,
as you never really know which version you will get.
We have a special sections with list of releases below.
Lets force users to choose what to install.
Change-Id: I2770521d92da4410c066fcf9ed23fef8b62db1b0
1) Starting with Grml 2017.05 we need net.ifnames=0 as default
boot option, otherwise we end up with network device names like
enp0s3 instead of eth0
2) Now that we're getting closer to the Debian/stretch release let's
add support for it through the boot menues
3) Noticed that the GRUB menu order is wrong for the Debian installation
options, make it consistent what we have in isolinux/syslinux.
Change-Id: Ia32c16707b158c8afb3a7babf7b51fe96ab05753
We shouldn't install wheezy systems with "Install sip:providerCE"
amd "Install sip:providerPRO" entries.
Change-Id: Ia78787c2bb997be55c86d7206c1c2723d4f36b63
DHCP somehow affects PRO installation by getting IP on eth1
which affects glusterfs. We should not use DHCP if user
explicitly choose static network configuration.
Change-Id: I6db8118916c2ca6bb1cec212f908b14dafc1e7fe
Using 2+ DNS servers is a good practice, also
ngcp-status reports error if he notice 1 DNS server only.
GRML support 2+ DNS servers in dns boot option, lets use it.
Change-Id: I236f7e5d854fef59f72323cf471fe4d949731c38
System boot freezes during udev startup on some systems (e.g. on
Supermicro boards and recent IBM server models). Workaround
required for Grml 2014.11: use boot option mgag200.modeset=0.
This should be made a default boot option in our ISOs.
Change-Id: I316d30f89fac6ced43256801f599e8b6366e9757
1) boot option 'ngcpnoupload' is depricated in trunk since f9192367
We have a Jenkins job for uploading and it uses option 'ngcpupload'.
2) Previously we used 'ngcpnoupload' to skip dumps upload to Git.
Uploading has been considered for CE-trunk only (skipped for other systems),
so there were no need to specify the option everywhere.
Anyway, 'ngcpnoupload' R.I.P
Change-Id: I13dd43be43be37152877cc3f183ec39863ea7e80
dns=92.42.136.30 doesn't work for the public so switch to
dns=8.8.8.8 instead, at least in the configs we use for
building the public Grml-Sipwise deployment ISO.
Some of them got lost in recent changes related to MT#6253 + MT#7365,
we want the trailing white space char because otherwise when typing
to add a new boot option it gets appended to the previous one (which
is unwanted and unexpected behaviour, as we had this behaviour ("space
char after last pre-configured boot option is present" since the
very first days).
So finally we can boot our deployment ISO in UEFI mode.
Documentation for the operation guys will follow in the ticket,
once everything is sorted out the according documentation can
be integrated in our documentation/handbook.
Closes: https://bugtracker.sipwise.com/view.php?id=1843
From: Michael Prokop <mprokop@sipwise.com>
Works on my machine™ now. Let's see whether we get this working
Hint: for testing efi boot inside kvm check out
http://dummdida.blogspot.co.at/2011/09/efi-kvm.html
From: Michael Prokop <mprokop@sipwise.com>
With the redesign of networking stuff and integration of eth1 we
currently do not need ngcpip{1,2}, ngcpeaddr and ngcpeiface=eth0
any longer. Instead we default to 192.168.255.25{1,2} for eth1
and use eth0 as ngcpeiface.
ngcphostname=... is not supported for pro installations since
the HA v2 setup depends on sp1 and sp2 for hostnames, therefore
do not provide the bootoption in the pro cmdlines for now.
From: Michael Prokop <mprokop@sipwise.com>
Deployed as of grml-sipwise_2011.05.16.iso:
* increase timeout to 60secs
* provide entry for hd1 boot
* enable ssh on all major bootoptions
* drop DHCP options for sp1/sp2
* rewrap help text
From: Michael Prokop <mprokop@sipwise.com>
The netscript does more than just vmbuilder stuff nowadays,
therefore move it from the vmbuilder package to a separate
package. ngcp-deployment provides everything needed for the
deployment itself, whereas ngcp-vmbuilder takes care of just
building the VMware/Virtualbox images based on the disk image
which might be the result of ngcp-deployment.
While at it provide the netscript as /usr/sbin/ngcp-deployment so
it can be used offline on the deployment ISOs itself as well
(offline usage by using /srv/mirror as mirror being WIP).
From: Michael Prokop <mprokop@sipwise.com>