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
[cinek@plkra-mas01 ~]$ az resource list -g TestGroup --query "[?contains(id,'testVMName')].{resourceName: name}" -o table | |
ResourceName | |
-------------------------------------------------- | |
testVMName_disk1_e75506fcb6cb4205aee4a1fc5fea0691 | |
testVMName_disk2_130becbc24874ea7a810255152459681 | |
testVMName | |
testVMNameVMNic | |
testVMNameNSG | |
testVMNamePublicIP | |
[cinek@plkra-mas01 ~]$ az resource list -g TestGroupt --query "[?contains(id,'testVMName')]" -o table |
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
bash-3.2$ az vm create<ENTER> | |
az vm create: error: the following arguments are required: --name/-n, --resource-group/-g | |
which is really great for me, so the simplest VM creation command is: | |
bash-3.2$ az vm create -n TestVM -g MarcinStolarek-Test<ENTER> | |
incorrect usage: --image IMAGE | --attach-os-disk DISK | |
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
ClusterName=cinekCluster | |
ControlMachine=aws-com01 | |
SlurmUser=slurm | |
SlurmctldPort=6817 | |
SlurmdPort=6818 | |
AuthType=auth/munge | |
StateSaveLocation=/var/spool/slurm/ctld | |
SlurmdSpoolDir=/var/spool/slurm/d | |
SwitchType=switch/none | |
MpiDefault=none |
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 | |
export AWS_ACCESS_KEY_ID="XXXX" | |
export AWS_SECRET_ACCESS_KEY="XXXXXXXXX" | |
exec &> >( logger -t slurm_resume ) | |
TMPFILE=$(mktemp) | |
cat << END > $TMPFILE | |
#Start "user defined" user data |
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
startall() { | |
for prog in `$BINDIR/scontrol show daemons`; do | |
if [[ ${prog} == slurmd ]] | |
then | |
#configure ip in slurmctl | |
IPADDRESS=$(ip a s eth0 | grep "inet "| awk '{split($2,a,"/");print(a[1])}') | |
scontrol update nodename=$(hostname -s) nodeaddr=$IPADDRESS nodehostname=$(hostname -s) | |
fi |
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
server { | |
listen *:443 ssl; | |
server_name icinga; | |
root /usr/share/icingaweb2/public; #Path of icinga2 web directory | |
index index.php; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
ssl_certificate icinga.pem; |
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
<table id="tableOfCriticals"> | |
</table> | |
<script> | |
function make_base_auth(user, password) { | |
var tok = user + ':' + password; | |
var hash = btoa(tok); | |
return 'Basic ' + hash; | |
} |
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
#!/usr/local/bin/python3 | |
import re | |
import numpy as np | |
import pylab as plt | |
class IozoneResult(np.ndarray): | |
def __new__(subtype, shape, dtype=float, buffer=None, offset=0, strides=None, order=None, name=None,fileSizes=None): | |
obj = super(IozoneResult, subtype).__new__(subtype, shape, dtype, buffer, offset, strides, order) |
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
def do_POST(self): | |
content_len=int(self.headers.getheader('content-length',0)) | |
received=self.rfile.read(content_len) | |
received=json.loads(received) | |
if self.path=='/annotation': | |
self._set_headers() | |
try: | |
rjson=json.loads(received) | |
annoReply='[{"annotation:": '+rjson["annotation"]["name"]+', "time": "0", "title": "Snow title"}]' | |
self.wfile.write(annoReply) |
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
def resize_vm(cmd, resource_group_name, vm_name, size, no_wait=False): | |
vm = get_vm(cmd, resource_group_name, vm_name) | |
vm.hardware_profile.vm_size = size # pylint: disable=no-member | |
return set_vm(cmd, vm, no_wait) |