@@ -1,8 +1,11 @@ | |||
# Download steps | |||
# wget http://git.bbh.org.in/chess/elxr/raw/branch/master/linux_setup.sh | |||
# chmod +x linux_setup.sh | |||
# ./linux_setup.sh | |||
# wget http://git.bbh.org.in/chess/elxr/raw/branch/master/linux/centos/elxr/setup.sh | |||
# chmod +x setup.sh | |||
# ./setup.sh | |||
# To delete all directories | |||
# find /path/to/your/directory -type d -exec rm -r {} + | |||
# find . -type d -exec rm -r {} + | |||
#STORE GIT CREDENTIALS IN CACHE | |||
sudo yum install git | |||
@@ -19,30 +22,37 @@ git config --global credential.helper store | |||
# Install prerequisites | |||
#NODE JS 16.17.1 | |||
wget https://nodejs.org/dist/v16.17.1/node-v16.17.1-linux-x64.tar.xz | |||
tar -xf node-v16.17.1-linux-x64.tar.xz | |||
node-v20.8.0-linux-x64.tar.xz | |||
wget https://nodejs.org/dist/v20.8.0/node-v20.8.0-linux-x64.tar.xz | |||
tar -xf node-v20.8.0-linux-x64.tar.xz | |||
# Move the extracted folder to /usr/local/lib | |||
sudo mv node-v16.17.1-linux-x64 /usr/local/lib/ | |||
sudo mv node-v20.8.0-linux-x64 /usr/local/lib/ | |||
# Create a symbolic link to the node executable | |||
sudo ln -s /usr/local/lib/node-v16.17.1-linux-x64/bin/node /usr/local/bin/node | |||
sudo ln -s /usr/local/lib/node-v20.8.0-linux-x64/bin/node /usr/local/bin/node | |||
sudo ln -s /usr/local/lib/node-v20.8.0-linux-x64/bin/npm /usr/local/bin/npm | |||
node -v | |||
npm -v | |||
#NPM | |||
sudo yum install npm | |||
sudo firewall-cmd --zone=public --add-port=8081/tcp --permanent | |||
# have to add all the ports to firewall. in pm2 when we run ecosystem file, that prints these commands | |||
sudo firewall-cmd --reload | |||
#INSTALLING NODE JS | |||
npm install -g pm2 | |||
sudo npm install -g pm2 | |||
npm install -g ember-cli | |||
npm install -g loopback-cli | |||
#production A SETUP | |||
cd ~ | |||
cd Desktop | |||
mkdir chess | |||
cd chess | |||
mkdir production_B | |||
cd production_B | |||
mkdir production_A | |||
cd production_A | |||
# echo "Enter instance type: eg production/production" | |||
# read instancetype | |||
@@ -53,8 +63,7 @@ cd production_B | |||
# mkdir $instancetype_$foldername | |||
# cd $instancetype_$foldername | |||
npm install pm2 -g | |||
ln -s cihsr-config-production/ elixir-config-production | |||
# ln -s cihsr-config-production/ cihsr-config-production | |||
git clone http://git.bbh.org.in/chess/cihsr-config-production | |||
cd cihsr-config-production | |||
@@ -99,7 +108,6 @@ npm i --force | |||
cd .. | |||
ln -s cihsr-clientconfig-production/ clientconfig | |||
cd .. | |||
git clone http://git.bbh.org.in/chess/bbhverse | |||
cd bbhverse | |||
git checkout production | |||
@@ -374,7 +382,7 @@ git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
bower install | |||
sudo bower install | |||
node_modules/.bin/bower install | |||
cd .. | |||
@@ -387,8 +395,8 @@ rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
git clone http://git.bbh.org.in/chess/elixir-client | |||
cd elixir-client | |||
git clone http://git.bbh.org.in/chess/cihsr-client | |||
cd cihsr-client | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
@@ -404,4 +412,23 @@ cd client | |||
rm -rf package-lock.json | |||
npm i --force | |||
node_modules/.bin/bower i | |||
node_modules/.bin/ember s | |||
node_modules/.bin/ember s | |||
# FOR Connecting to NTP for time sync | |||
# Install Chrony | |||
sudo dnf install -y chrony | |||
# Enable and start the Chrony service | |||
sudo systemctl enable chronyd | |||
sudo systemctl start chronyd | |||
sudo timedatectl set-timezone Asia/Kolkata | |||
# Configure NTP servers (Replace with your desired NTP servers) | |||
echo "server zen01.local.bbh iburst" | sudo tee -a /etc/chrony.conf | |||
# Restart Chrony service | |||
sudo systemctl restart chronyd | |||
# Display NTP synchronization status | |||
chronyc tracking |
@@ -1,7 +1,7 @@ | |||
# Download steps | |||
# wget http://git.bbh.org.in/chess/elxr/raw/branch/master/linux_setup_el.sh | |||
# chmod +x linux_setup_el.sh | |||
# ./linux_setup_el.sh | |||
# wget http://git.bbh.org.in/chess/elxr/raw/branch/master/linux/centos/elxr/setup.sh | |||
# chmod +x setup.sh | |||
# ./setup.sh | |||
# To delete all directories | |||
# find /path/to/your/directory -type d -exec rm -r {} + | |||
@@ -38,6 +38,7 @@ sudo yum install npm | |||
sudo firewall-cmd --zone=public --add-port=8081/tcp --permanent | |||
# have to add all the ports to firewall. in pm2 when we run ecosystem file, that prints these commands | |||
sudo firewall-cmd --reload | |||
@@ -1,31 +1,26 @@ | |||
# Download steps | |||
# wget http://git.bbh.org.in/chess/elxr/raw/branch/master/linux_prodsync.sh | |||
# chmod +x linux_prodsync.sh | |||
# ./linux_prodsync.sh | |||
# run this file from the root of instance, eg either in prodA / prodB folder | |||
# wget http://git.bbh.org.in/chess/elxr/raw/branch/master/linux/centos/pullprod.sh | |||
cd ~ | |||
cd Desktop | |||
cd chess | |||
cd production_A | |||
# chmod +x linux_prodsync.sh | |||
# ./linux_prodsync.sh | |||
cd cihsr-config-production | |||
cd config | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd cihsr-data | |||
cd data | |||
git checkout production | |||
git pull | |||
# git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd cihsr-clientconfig-production | |||
cd clientconfig | |||
git checkout production | |||
git pull | |||
git pull origin master |
@@ -0,0 +1,317 @@ | |||
# Download steps | |||
# run this file from the root of instance, eg either in prodA / prodB folder | |||
# wget http://git.bbh.org.in/chess/elxr/raw/branch/master/linux/centos/syncProdFromMaster.sh | |||
# chmod +x linux_prodsync.sh | |||
# ./linux_prodsync.sh | |||
cd config | |||
git checkout production | |||
git pull | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd data | |||
git checkout production | |||
git pull | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd clientconfig | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd ember-masonry-grid | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd bbhverse | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd clientverse | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd serververse | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd elxr | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd ember-searchable-select | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd loopback-component-jsonapi | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd loopback-jsonapi-model-serializer | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
npm run build | |||
cd .. | |||
cd loopback-connector-mysql | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd loopback-connector-ds | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd setup | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd ember-service-worker | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd ember-service-worker-asset-cache | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd ember-service-worker-cache-fallback | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd ember-service-worker-index | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd ember-sw-client-route | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd global-this | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd ember-cp-validations | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd loopback-connector | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd loopback | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd loopback-datasource-juggler | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd loopback-connector-mssql | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd loopback-filters | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd loopback-connector-sqlite3 | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd chess-server-lib | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd server | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd .. | |||
cd cihsr-server | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd bbh_patient_portal | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd project-genesis-frontend | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd project-genesis-backend | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd processmanager | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd client | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
bower install | |||
node_modules/.bin/bower install | |||
cd .. | |||
cd chess-client-lib | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd elixir-client | |||
git checkout production | |||
git pull | |||
git pull origin master | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd chess-client-lib | |||
rm -rf package-lock.json | |||
npm i --force | |||
cd .. | |||
cd client | |||
rm -rf package-lock.json | |||
npm i --force | |||
node_modules/.bin/bower i | |||
npm run build-prod | |||
pm2 kill | |||
cd ../processmanager | |||
pm2 start ecosystem-config.js --env production | |||