TT#47956 Subtract HA repo setup from 'initialise' into 'init-shared'

We need to initialize ngcpcfg without HA repo,
to solve chicken-eggs problem about git hooks handking.
Also it will be useful to build glusterfs configs
from tt2 templates and yml configuration.
Then start glusterfs and store HA repo on glusterfs.

In this case ngcp-installer will be able to call:
> ngcpcfg initialise --without_shared
> ngcpcfg set ...
> ngcpcfg build ...
> ngcpcfg init-shared
> ngcpcfg apply "Applying everything together"

In the past it was not so critical problem until we started
taking care about the files permissions which are coming from
ngcp-template-* packages and transferred to POSIX perms via ngcpcfg.
One of the problems there is 'git clone' (which is a part of
HA setup initialisation). It resets file perms if they are not
yet stored into file '.ngcpcfg_perms'.

Change-Id: I3cdc93f309f0b899e626779afb1e71f64b2cb953
changes/83/25083/4
Mykola Malkov 8 years ago
parent 6b35840ba2
commit 1a9d71268d

@ -379,11 +379,19 @@ installed.
Display usage information and exit.
**initialise**::
**initialise [--without_shared]**::
If ngcpcfg was installed but isn't configured yet the 'initialise' option sets
up ngcpcfg accordingly. Follow the instructions from the <<setup_instructions,
Setup instructions>> section.
Setup instructions>> section. Option '--without_shared' allows to skip shared
repository setup (which is necessary on High Availability setup only).
**init-shared**::
The ngcpcfg configures shared repository to synchronise configurations between
all nodes in installation. It is necessary if ngcpcfg was initialised using
option '--without_shared'. Note: Feature is available in the High Availability
setup only.
**init-mgmt** <server>::

@ -145,6 +145,7 @@ case ${1:-} in
diff|\
encrypt|\
init-mgmt|\
init-shared|\
initialise|\
log|\
pull|\

@ -18,6 +18,15 @@ fi
# main script
while (( "$#" )); do
case "${1}" in
--without_shared)
WITHOUT_SHARED='true'
shift
;;
esac
done
log_debug "cd $NGCPCTL_MAIN"
cd "$NGCPCTL_MAIN"
@ -60,8 +69,10 @@ if ! is_git_clean ; then
fi
if type -p init_ha &>/dev/null ; then
log_debug "init_ha function"
init_ha
if ! "${WITHOUT_SHARED:-false}" ; then
log_debug "init_ha function"
init_ha
fi
fi
if ! [ -r /etc/.gitignore ] ; then

Loading…
Cancel
Save