Ricardo Jun
2018-11-21 424a1b26bc41f07e90560e8750ccfedc39992d94
Fixed issue
2 files modified
8 ■■■■ changed files
extras/backup/git-clones.sh 2 ●●● patch | view | raw | blame | history
extras/backup/nexus-update.sh 6 ●●●● patch | view | raw | blame | history
extras/backup/git-clones.sh
@@ -1,6 +1,6 @@
ssh root@services git clone https://github.com/gpe-mw-training/gpte-ng-dmf.git
ssh root@services "sed -i -e 's|git+https://github.com/gpe-mw-training/gpte-ng-dmf.git|http://services.lab.example.com/gpte-ng-dmf|' /root/gpte-ng-dmf/package.json"
ssh root@services "sed -i -e 's|npm install express && npm install http && npm install path && node server.js|npm config set registry \"http://services.lab.example.com:8081/nexus/content/groups/nodejs\" && npm install express && npm install http && npm install path && node server.js|' /root/gpte-ng-dmf/package.json"
ssh root@services 'sed -i -e "s|npm install express && npm install http && npm install path && node server.js|npm config set registry \"http://services.lab.example.com:8081/nexus/content/groups/nodejs\" && npm install express && npm install http && npm install path && node server.js|" /root/gpte-ng-dmf/package.json'
ssh root@services mkdir /var/www/git/gpte-ng-dmf
ssh root@services 'cd /var/www/git/gpte-ng-dmf/ && git init --bare'
ssh root@services 'cd /var/www/git/gpte-ng-dmf/ && git update-server-info'
extras/backup/nexus-update.sh
@@ -1,12 +1,12 @@
ssh root@sclassroom rht-config-nat
ssh root@classroom rht-config-nat
ssh root@services mkdir /tmp/dc39
ssh root@services rsync -aPv * /tmp/dc39
rsync -aPv * root@services:/tmp/dc39
ssh root@services systemctl stop nexus
ssh root@services rm -rf /opt/nexus*
ssh root@services wget -O /opt/nexus-latest-bundle.tar.gz https://download.sonatype.com/nexus/oss/nexus-latest-bundle.tar.gz 
ssh root@services tar xzvf /opt/nexus-latest-bundle.tar.gz -C /opt
ssh root@services chown -R nexus:nexus /opt/nexus*
ssh root@services chown -R nexus:nexus /opt/sonatype-work
nexus_dir=$(ssh root@services ls /opt/nexus*)
nexus_dir=$(ssh root@services "ls /opt | grep nexus-2.14")
ssh root@services ln -s /opt/${nexus_dir} /opt/nexus
ssh root@services systemctl start nexus