deployment.sh can install plain Debian systems (without NGCP),
in commit d2afaf9 such functionality has been lost. Fixing it here.
Change-Id: I883ef3c69c67cc04ae796c373f3b52d75780b4de
Currently grml-debootstrap only sets /etc/localtime, but not
/etc/timezone, so this confuses the system with libraries/tools
that read the former and others the latter. Reconfigure tzdata so
that it can get both files into a consistent state.
Change-Id: Id34c1a088809fbac19957a750c31fb8f3ceda893
It is necessary to use separate apt database and source list because
non management node has no internet access so is installed from
management node so these additional packages have to be
installed/accessible from sipwise repo.
Change-Id: I4c1310320c4d66aba01af5ce00127f4757ec71ad
Make a single list of all required packages.
For each package from the list check if it is installed or not.
Install all packages at once.
Remove custom source.list for these additional packages. Previously it
was used because GRML image and its default source.list were too old.
Now a new GRML is used so we have a vise-versa situation - deb.sipwise.com
contains older packages than default source.list so there is no sense to
use any custom locations and options.
Change-Id: I33239c255f5af666ca9bbead9d3a584de9335bb6
This code is called only once so there is no sense to make it as function.
Optimize the code - use 'sort' instead of 'for' cycle to remove duplicates.
Change-Id: I2658b2fbbb3a9478e11337327d8a76a259f22c26
Our goal is to separate installation and configuration parts so
any network related things have to be configured after the installation
and reboot. But during the deployment.sh we need to configure one
interface which will be used after the reboot. So we need consistent
interfaces' name between reboot.
Change-Id: Ib4cd19bf0455c1365a2d33fc5a90209d0a5d62d7
Several changes:
- Promote the variables to top level. Local variables are good for some things,
but if they represent external resources, it's probably better to have them
defined outside as a kind of constants, instead of deeply buried inside
functions.
- Make 'wget' a bit more robust and less verbose (to not have dozens of lines of
useless output with the progress of a big file).
Change-Id: I679de4e976497d0cf6ca3da2e13ff2fb8a76d881
The variables related to Pro edition (at least Role) needs to be present when
installing some nodes Carrier, otherwise the installation doesn't work as
expected.
Change-Id: Ibea819889f42559626164b9e344670edea5cad1b
If the dir is owned by "_apt", apt-get can use this user for network operations
instead of having to stay as "root".
Change-Id: Ib41d591d1da539c3d43fa945262d0b9766a6be23
Add choice continue or not if virtualized system was not detected and
it is interactive mode.
If it is non interactive mode - continue the deployment.
Change-Id: I8913dda6121c0e46a6de21ad1ab95eceb2c45227
The file /tmp/ngcp-installer-cmdline.log is available when GRML is running only
and will gone right after the reboot. In the same time original
"${TARGET}/etc/ngcp-installer/config_deploy.inc" is also available
during GRML is running and will stay after the reboot.
For all the time I had no reason to check /tmp/ngcp-installer-cmdline.log,
as I always used config_deploy.inc directly (which is also covered by etckeeper).
Removing it as a part of minimizing log files program.
Change-Id: Idcc2ced1bf2aba261bd519abcdb91c1f8fe0336b
* ngcp-installer*deb can be deleted right after the package installation
* ${TARGET}/config_*yml and ${TARGET}/constants_*.yml are leftovers.
They are no longer available on NGCP (long long time ago we created
them to upload CFG schema dump into git every night).
See commit ba06d2b145e3e20468de532e77fa501cd38a72e7 to netscript.git
Change-Id: I75a575233a5074143d7d35de26b33f161cf77e4f
We have a lot of different log files on GRML/deployment.sh stage,
let's minimize the count here and use main $INSTALL_LOG for all
the messages printed by deployment.sh (it will simpify further debug).
Previously logit() printed to GRML /var/log/syslog which is not
available on NGCP after reboot, the new code will use $INSTALL_LOG.
Change-Id: I675c45ebc2852b00253e7b51e7abd4a10a0fb714
First of all the information here was outdated and confusing.
Moreover it duplicates info in deployment-installer-debug.log.
The line "NGCP_INSTALLER_CMDLINE=..." didn't represent the actual
running command for several years already. Also the line SCRIPT_VERSION
is already printed to all log files several times already.
The only missing line was CMD_LINE, so printing it if debug is enabled.
Change-Id: I19255354c8314201992385f5b5bb7e60910bc26a
This is an old option we do not use anymore.
The option 'ngcpppa' is more flexible and powerful nowadays.
Change-Id: I829189a9e92ee352daa4f826dd3720723c6df3e2
Those firmwares have been moved to NGCP metapackages to ensure
they are always available.
Also Puppet server ensures they are available on
internal infrastructure.
Change-Id: I88cd1d7592ec5290c10f05b1f202114f8c86299a
If NGCP PPA is defined and does NOT contain ngcp-installer package,
we should use the default (release and product specific) ngcp-installer.
Change-Id: Iac0863698e174e333108a0d01bf687c3de85ef99
ngcp-installer installs it already also puppet depends on it.
Also metapackages have dependency on it now.
Actually it looks like Debian stretch debootstrap installs
apt-transport-https out of the box which recommends 'ca-certificates'
as a result both are installed after the debootstrap.
Change-Id: I84fa358b61aed25594a38c21efaec27ba96d6918
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