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
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