If the installation device is virtual it is necessary to redefine
DEFAULT_INSTALL_DEV variable to the name of real interface but
save the origin name to stop it.
Change-Id: I9e59ca8411e713235a0e0e5407ef0c3acc30e299
This list is used to add all network interfaces to network.yml but
we do not need to add virtual interfaces there - they will be added
automatically from installation's configuration.
Change-Id: I3f21abc066b4f0c714b1780dcfdf4335e7506d1d
The deployment.sh script as well as installer should not configure system
or services.
Remove network's configuration code.
Remove services' configuration code.
Remove unused variables and parameters.
Copy existing /e/n/i into chroot env so the server starts with the same
network configuration.
Move gateway detection to the top - we need this information to generate
proper /e/n/i
Change-Id: I16e4f19f3b9270ccfef6c7c1274bb8b8d95695bd
1. 'localhost' has to be resolved to ipv4 only not ipv6.
2. There should be 'hostname.' with dot record.
Change-Id: I9f34f45b00453746b254f41494d7652a10de0d04
Without explicit return function returns the exit code of the last function
which in not 0 in this case so it causes amiss exit of the script.
Change-Id: Ic7f1f534048cb051fe116cb76ee386bf4ca07ff4
If 'systemctl reboot|halt' is called within script 'trap' function
is not called so deployment.sh does not wait and jenkins can miss
the status.
Move waiting to separate function and call it directly so there is
waiting in the end of deployment.sh in any case.
Change-Id: Ib93bf6fd4e6f133c9342d02d412ea1f18cdceba6
For now if there is an error in deployment.sh it is ended immediately
so jenkins node can miss deploy status.
Add wait_exit function which is called on any exit and waits
STATUS_WAIT seconds.
Change-Id: I715c2484a25222221d61a01bd220973e89547929
We are NOT installing non-free firmware packages on NGCP (since TT#42672),
as a result we should not purge them. See commit 9161d0f57 in
metapackages.git for more information.
Change-Id: I84ff3486c0b03bbc228e5332955f6654b3519137
The hardcoded list of accepted drives is never really up2date
and was meant as a safety net in the beginnings of deployment.sh.
Let's drop those checks to avoid failures in automated installations,
interactive installer/deployment mode is supposed to prompt for
before actually executing anything anyway.
Change-Id: Ib6dcaec8a221dc268638a98055219a5ae3c92a00
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
Fix endless cycle in case of multiple interfaces and non interctive
mode.
Add exit if interface was configured.
Change-Id: I8ddb00f9b4dbcd997bb6fc95e100d7db6f8870b2
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
Network device and parameters can be passed via environment variables
so script will create the network configuration without asking for
parameters.
Limitations - wlan and vlan configurations are not supported.
The list of parameters:
NET_DEV - name of network interface to configure.
METHOD - method of obtaining IP address. Can be dhcp|static|manual.
If both of these parameter defined then non-interactive mode is
used.
IPADDR - IP address for network interface.
NETMASK - netmask for network interface.
If method is 'static' or 'manual' then these parameters are mandatory.
GATEWAY - address of default route.
DNS - comma separated list of dns servers.
Add '--force' key to ifdown command before configuration of the interface.
It is required for interface reconfiguration.
Change-Id: I267d5e5ae1a6fb9c4a6234af582165c6c5fa5dc5
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