This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
. /home/opc/ocisge/scripts/cluster-info | |
echo "$(date) Starting to initializing cluster" | |
# Add ADMIN and SUBMIT host | |
MASTER_PRIVATE_IP=$(curl -s http://169.254.169.254/opc/v1/vnics/ | jq -r '.[].privateIp') | |
MASTER_HOSTNAME=$(host $MASTER_PRIVATE_IP | awk '{ sub(/\.$/, ""); print $NF }') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source /etc/opt/oci-hpc/bashrc/.bashrc_openmpi3 | |
#N-GenIC | |
cd /mnt/nfs-share/TIFR/N-GenIC/ | |
mpirun $MPI_FLAGS --mca orte_base_help_aggregate 0 --display-map --machinefile /etc/opt/oci-hpc/hostfile /mnt/nfs-share/TIFR/N-GenIC/N-GenIC /mnt/nfs-share/TIFR/N-GenIC/run64.param | |
mpirun $MPI_FLAGS --mca orte_base_help_aggregate 0 --display-map --machinefile /etc/opt/oci-hpc/hostfile /mnt/nfs-share/TIFR/N-GenIC/N-GenIC /mnt/nfs-share/TIFR/N-GenIC/planck1_160_1024.param | |
#P-Gadget | |
cd /mnt/nfs-share/TIFR/P-Gadget3/ | |
mpirun $MPI_FLAGS --mca orte_base_help_aggregate 0 --display-map --machinefile /etc/opt/oci-hpc/hostfile /mnt/nfs-share/TIFR/P-Gadget3/P-Gadget3 /mnt/nfs-share/TIFR/P-Gadget3/param.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all OEL images | |
oci compute image list --all --output table --query "data [?\"operating-system\" == 'Oracle Linux'].{name:\"display-name\",date:\"time-created\",size:\"size-in-mbs\",os:\"operating-system\",version:\"operating-system-version\"}" | |
# Delete all users in an IAM group | |
LINES=$(oci iam group list-users -c $COMPARTMENT_ID --group-id GROUP_ID | jq -r '.data[] | .id' | wc -l) | |
n=0 | |
while (( $n <= $LINES )) | |
do | |
oci iam group remove-user --force -c COMPARTMENT_ID --group-id GROUP_ID --user-id $(oci iam group list-users -c COMPARTMENT_ID --group-id GROUP_ID | jq -r '.data['$n'] | .id') | |
(( n++ )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace with your Workspace ID | |
$CustomerId = "" | |
# Replace with your Primary Key | |
$SharedKey = "" | |
# Specify the name of the record type that you'll be creating | |
$LogType = "Minecraft" | |
# Specify a field with the created time for the records |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update \ | |
&& apt-get install -y wget apt-utils \ | |
&& sed -i.bak 's/101/0/' /usr/sbin/policy-rc.d \ | |
&& wget https://app.deepsecurity.trendmicro.com:443/software/agent/Ubuntu_14.04/x86_64/ -O /tmp/agent.deb --quiet \ | |
&& dpkg -i /tmp/agent.deb \ | |
&& sleep 15 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update | |
RUN apt-get install -y wget apt-utils | |
RUN sed -i.bak 's/101/0/' /usr/sbin/policy-rc.d | |
RUN wget https://app.deepsecurity.trendmicro.com:443/software/agent/Ubuntu_14.04/x86_64/ -O /tmp/agent.deb --quiet | |
RUN dpkg -i /tmp/agent.deb | |
RUN sleep 15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the records to ordering database on MongoDB | |
sudo mongo ordering /var/lib/partsunlimited/MongoRecords.js | |
# Change Tomcat listening port from 8080 to 9080 | |
sudo sed -i s/8080/9080/g /etc/tomcat7/server.xml | |
# Remove existing MRP directory and copy WAR file to Tomcat directory for auto-deployment | |
sudo rm -rf /var/lib/tomcat7/webapps/mrp | |
sudo cp /var/lib/partsunlimited/mrp.war /var/lib/tomcat7/webapps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: omsagent | |
spec: | |
template: | |
metadata: | |
labels: | |
app: omsagent | |
spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oguzp@oguzp-agent1:~$ azure vm list | |
info: Executing command vm list | |
+ Getting virtual machines | |
data: Name Status Location DNS Name IP Address | |
data: -------------------- ------------------ ---------------- --------------------------------- ---------- | |
data: oguzp-agent1 ReadyRole West US oguzp-agent1.cloudapp.net 172.16.0.4 | |
data: oguzp-mrp StoppedDeallocated South Central US oguzp-mrp.cloudapp.net | |
data: oguzp-mrp2 StoppedDeallocated South Central US oguzp-mrp.cloudapp.net | |
data: oguzp-mrp3 StoppedDeallocated South Central US oguzp-mrp.cloudapp.net | |
data: oguzp-mesos StoppedDeallocated South Central US oguzp-mesos.cloudapp.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
echo "" | |
echo "-----------------------------------" | |
echo "" | |
echo "WHAT DO YOU WANT TO DO TODAY?" | |
echo "" | |
echo "1 - Start all the VMs" | |
echo "2 - Shutdown all the VMs" |