commit by to_remotes 2023-09-04 10:17:46 +0200 from vmdevhw
parent
94e45deb1e
commit
6258505903
58
init.sh
58
init.sh
|
|
@ -23,11 +23,8 @@ mkdir -p $HOME/.ssh
|
||||||
|
|
||||||
ssh-keygen -t rsa -N "$passphrase" -C "deploy_key_$client_name" -f $HOME/.ssh/deploy_key
|
ssh-keygen -t rsa -N "$passphrase" -C "deploy_key_$client_name" -f $HOME/.ssh/deploy_key
|
||||||
|
|
||||||
|
echo "please now upload pub key into repo ..."
|
||||||
|
echo "firefox https://git.service.wiseadvice.eu/"
|
||||||
|
|
||||||
|
|
||||||
echo "upload pub key into repo"
|
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
cat $HOME/.ssh/deploy_key.pub
|
cat $HOME/.ssh/deploy_key.pub
|
||||||
|
|
@ -35,13 +32,13 @@ cat $HOME/.ssh/deploy_key.pub
|
||||||
echo " "
|
echo " "
|
||||||
echo -n "ready to pull? type yes: "
|
echo -n "ready to pull? type yes: "
|
||||||
read -r ready_to_pull
|
read -r ready_to_pull
|
||||||
|
WA_REPO=$HOME/wa_repos
|
||||||
if [ "$ready_to_pull" = "yes" ]; then
|
if [ -d "$WA_REPO" ]; then
|
||||||
|
echo "$WA_REPO does exist, skipping cloning"
|
||||||
echo "preparing"
|
else
|
||||||
|
if [ "$ready_to_pull" = "yes" ]; then
|
||||||
cat <<EOT >> $HOME/.ssh/config
|
echo "preparing"
|
||||||
|
cat <<EOT >> $HOME/.ssh/config
|
||||||
Host git.service.wiseadvice.eu
|
Host git.service.wiseadvice.eu
|
||||||
HostName git.service.wiseadvice.eu
|
HostName git.service.wiseadvice.eu
|
||||||
IdentityFile ~/.ssh/deploy_key
|
IdentityFile ~/.ssh/deploy_key
|
||||||
|
|
@ -49,29 +46,20 @@ Host git.service.wiseadvice.eu
|
||||||
IdentitiesOnly yes
|
IdentitiesOnly yes
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
git_target=$HOME/wa_repos_test
|
rm -rf $WA_REPO
|
||||||
rm -rf $git_target
|
mkdir -p $WA_REPO
|
||||||
mkdir -p $git_target
|
cd $WA_REPO
|
||||||
|
echo "starting to pull into $(pwd)"
|
||||||
cd $git_target
|
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/shared_resources_k8s.git
|
||||||
|
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/cimp_etops_lgt.git
|
||||||
|
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/common_sysadmin.git
|
||||||
|
|
||||||
echo "starting to pull into $(pwd)"
|
ln -sf $WA_REPO/common_sysadmin/k8s $HOME/kubeconfs_common
|
||||||
|
ln -sf $WA_REPO/shared_resources_k8s/k8s $HOME/kubeconfs_common
|
||||||
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/shared_resources_k8s.git
|
ln -sf $WA_REPO/shared_resources_k8s/manifest.sh .zshrc
|
||||||
|
ln -sf $WA_REPO/cimp_etops_lgt/k8s $HOME/kubeconfs
|
||||||
ln -sf $HOME/shared_resources_k8s/k8s $HOME/kubeconfs_common
|
else
|
||||||
|
echo "Aborting"
|
||||||
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/cimp_etops_lgt.git
|
|
||||||
|
|
||||||
ln -sf $HOME/cimp_etops_lgt/k8s $HOME/kubeconfs
|
|
||||||
ln -sf $HOME/common_sysadmin/k8s $HOME/kubeconfs
|
|
||||||
|
|
||||||
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/common_sysadmin.git
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "Aborting"
|
|
||||||
|
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue