diff --git a/OpenStack-Rally-Tester/usr/local/bin/rally_extract_results.py b/OpenStack-Rally-Tester/usr/local/bin/rally_extract_results.py index 98467df6..c2d0f148 100644 --- a/OpenStack-Rally-Tester/usr/local/bin/rally_extract_results.py +++ b/OpenStack-Rally-Tester/usr/local/bin/rally_extract_results.py @@ -4,6 +4,7 @@ """ Parses results from the rally task report and sends them to influxdb """ + import json import sys import time diff --git a/OpenStack-accounting/usr/local/sbin/accountinglib.py b/OpenStack-accounting/usr/local/sbin/accountinglib.py index b772d78b..a6e49ae6 100644 --- a/OpenStack-accounting/usr/local/sbin/accountinglib.py +++ b/OpenStack-accounting/usr/local/sbin/accountinglib.py @@ -3,7 +3,8 @@ # Copyright (c) 2023 United Kingdom Research and Innovation import time import datetime -#from datetime import datetime,time + +# from datetime import datetime,time import json import requests import sys @@ -13,22 +14,27 @@ from sqlalchemy.orm import sessionmaker import configparser + def get_logger(component): - logging.basicConfig(filename="/var/log/thecount.log", - format=f'%(asctime)s {component} %(message)s', - filemode='a') + logging.basicConfig( + filename="/var/log/thecount.log", + format=f"%(asctime)s {component} %(message)s", + filemode="a", + ) logger = logging.getLogger() logger.setLevel(logging.INFO) return logger + def ifnull(var, val): - '''Returns the second argument if the first argument is Null/None''' + """Returns the second argument if the first argument is Null/None""" if var is None: return val return var + def project_to_department(result): - '''Returns an appropriate department for a project''' + """Returns an appropriate department for a project""" if "rally" in result["Project"]: department = "STFC Cloud" elif "efault" in result["Department"]: @@ -37,51 +43,57 @@ def project_to_department(result): department = result["Department"] return department + def send_to_influx(datastring, logger): - '''Takes a datastring formatted to send to InfluxDBs rest api. Loads necessary config, sends and returns the response''' + """Takes a datastring formatted to send to InfluxDBs rest api. Loads necessary config, sends and returns the response""" # Read from config file influx_parser = configparser.SafeConfigParser() try: - influx_parser.read('/etc/influxdb.conf') + influx_parser.read("/etc/influxdb.conf") except Exceptions as exp: - logger.info(f'Unable to read from influx config file - {str(exp)}') + logger.info(f"Unable to read from influx config file - {str(exp)}") sys.exit(1) try: - host = influx_parser.get('db', 'host') - database = influx_parser.get('db', 'database') - username = influx_parser.get('auth', 'username') - password = influx_parser.get('auth', 'password') - instance = influx_parser.get('cloud','instance') + host = influx_parser.get("db", "host") + database = influx_parser.get("db", "database") + username = influx_parser.get("auth", "username") + password = influx_parser.get("auth", "password") + instance = influx_parser.get("cloud", "instance") except Exceptions as exp: - logger.info(f'Unable to parse influx config file - {str(exp)}') + logger.info(f"Unable to parse influx config file - {str(exp)}") sys.exit(1) - finaldatastring = datastring.replace("Accounting,","Accounting,instance="+instance+",") + finaldatastring = datastring.replace( + "Accounting,", "Accounting,instance=" + instance + "," + ) logger.info(finaldatastring) - url = f'http://{host}/write?db={database}&precision=s' - response = requests.post(url,data=finaldatastring,auth=(username,password)) + url = f"http://{host}/write?db={database}&precision=s" + response = requests.post(url, data=finaldatastring, auth=(username, password)) return response -def get_accounting_data(database,starttime,endtime, logger): - '''Takes a db name and a start and end time as arguments. Loads db config, creates a db connection and runs a stored procedure. Returns the results of the stored procedure''' + +def get_accounting_data(database, starttime, endtime, logger): + """Takes a db name and a start and end time as arguments. Loads db config, creates a db connection and runs a stored procedure. Returns the results of the stored procedure""" thecount_parser = configparser.RawConfigParser(strict=False) try: - thecount_parser.read('/etc/thecount/thecount.conf') + thecount_parser.read("/etc/thecount/thecount.conf") except Exceptions as exp: - logger.info(f'Unable to read from thecount config file - {str(exp)}') + logger.info(f"Unable to read from thecount config file - {str(exp)}") sys.exit(1) try: - connectionstring = thecount_parser.get('database','connection') + '/' + database + connectionstring = ( + thecount_parser.get("database", "connection") + "/" + database + ) except Exceptions as exp: - logger.info(f'Unable to parse thecount config file - {str(exp)}') + logger.info(f"Unable to parse thecount config file - {str(exp)}") sys.exit(1) - engine = sqlalchemy.create_engine(connectionstring, encoding='utf-8') + engine = sqlalchemy.create_engine(connectionstring, encoding="utf-8") connection = engine.connect() sess = sessionmaker(bind=engine)() query = f'call get_accounting_data( "{starttime}","{endtime}")' logger.info(query) - results = sess.execute(query, { 'p1': starttime, 'p2': endtime }) + results = sess.execute(query, {"p1": starttime, "p2": endtime}) return results diff --git a/OpenStack-accounting/usr/local/sbin/cinder_extract_accounting.py b/OpenStack-accounting/usr/local/sbin/cinder_extract_accounting.py index e5b10e9e..c56fbdf5 100644 --- a/OpenStack-accounting/usr/local/sbin/cinder_extract_accounting.py +++ b/OpenStack-accounting/usr/local/sbin/cinder_extract_accounting.py @@ -8,42 +8,43 @@ import datetime import logging + def main(): - '''Processes accounting from Cinder''' + """Processes accounting from Cinder""" nowtime = time.localtime() logger = accountinglib.get_logger("cinder") logger.info("Cinder Accounting run start") - starttime=sys.argv[1] + starttime = sys.argv[1] logger.info("Start Time = " + starttime) - endtime=sys.argv[2] + endtime = sys.argv[2] logger.info("End Time = " + endtime) - endyyyymm=datetime.datetime.strptime(endtime,"%Y-%m-%d %H:%M").strftime('%Y-%m') - endtimestamp = time.mktime(datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").timetuple()) - + endyyyymm = datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").strftime("%Y-%m") + endtimestamp = time.mktime( + datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").timetuple() + ) results = accountinglib.get_accounting_data("cinder", starttime, endtime, logger) - datastring = '' + datastring = "" logger.info(results) for result in results: logger.info(result) department = accountinglib.project_to_department(result) - datastring += "Accounting" - datastring += ",AvailabilityZone="+result["AvailabilityZone"] - datastring += ",Project="+result["Project"].replace(' ','\ ') - datastring += ",Department="+department.replace(' ','\ ') - datastring += ",CinderType="+result["CinderType"] - datastring += ",YYYY-MM="+ endyyyymm - datastring += " Volumes="+str(result["Volumes"]) - datastring += ",Volume_Seconds="+str(result["Volume_Seconds"]) - datastring += ",CinderGBs="+str(result["Volume_GB"] * result['Volume_Seconds'] * result["Volumes"]) - - - - datastring += " "+str(int(endtimestamp)) + datastring += ",AvailabilityZone=" + result["AvailabilityZone"] + datastring += ",Project=" + result["Project"].replace(" ", "\ ") + datastring += ",Department=" + department.replace(" ", "\ ") + datastring += ",CinderType=" + result["CinderType"] + datastring += ",YYYY-MM=" + endyyyymm + datastring += " Volumes=" + str(result["Volumes"]) + datastring += ",Volume_Seconds=" + str(result["Volume_Seconds"]) + datastring += ",CinderGBs=" + str( + result["Volume_GB"] * result["Volume_Seconds"] * result["Volumes"] + ) + + datastring += " " + str(int(endtimestamp)) datastring += "\n" r = accountinglib.send_to_influx(datastring, logger) @@ -51,5 +52,6 @@ def main(): logger.info(r.text) logger.info(r) + if __name__ == "__main__": main() diff --git a/OpenStack-accounting/usr/local/sbin/glance_extract_accounting.py b/OpenStack-accounting/usr/local/sbin/glance_extract_accounting.py index 5d283573..f241b20f 100644 --- a/OpenStack-accounting/usr/local/sbin/glance_extract_accounting.py +++ b/OpenStack-accounting/usr/local/sbin/glance_extract_accounting.py @@ -8,22 +8,24 @@ import datetime import logging + def main(): - '''Processes accounting from Glance''' + """Processes accounting from Glance""" nowtime = time.localtime() logger = accountinglib.get_logger("glance") logger.info("Glance Accounting run start") - starttime=sys.argv[1] + starttime = sys.argv[1] logger.info("Start Time = " + starttime) - endtime=sys.argv[2] + endtime = sys.argv[2] logger.info("End Time = " + endtime) - endyyyymm=datetime.datetime.strptime(endtime,"%Y-%m-%d %H:%M").strftime('%Y-%m') - endtimestamp = time.mktime(datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").timetuple()) - + endyyyymm = datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").strftime("%Y-%m") + endtimestamp = time.mktime( + datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").timetuple() + ) results = accountinglib.get_accounting_data("glance", starttime, endtime, logger) - datastring = '' + datastring = "" logger.info(results) for result in results: logger.info(result) @@ -31,18 +33,18 @@ def main(): datastring += "Accounting" - datastring += ",Project="+result["Project"].replace(' ','\ ') - datastring += ",Department="+department.replace(' ','\ ') - datastring += ",StorageBackend="+result["StorageBackend"] - datastring += ",GlanceType="+result["GlanceType"] - datastring += ",YYYY-MM="+ endyyyymm - datastring += " Images="+str(result["Images"]) - datastring += ",Image_Seconds="+str(result["Image_Seconds"]) - datastring += ",GlanceGBSeconds="+str(result["Glance_GB"] * result['Image_Seconds'] * result['Images']) - - - - datastring += " "+str(int(endtimestamp)) + datastring += ",Project=" + result["Project"].replace(" ", "\ ") + datastring += ",Department=" + department.replace(" ", "\ ") + datastring += ",StorageBackend=" + result["StorageBackend"] + datastring += ",GlanceType=" + result["GlanceType"] + datastring += ",YYYY-MM=" + endyyyymm + datastring += " Images=" + str(result["Images"]) + datastring += ",Image_Seconds=" + str(result["Image_Seconds"]) + datastring += ",GlanceGBSeconds=" + str( + result["Glance_GB"] * result["Image_Seconds"] * result["Images"] + ) + + datastring += " " + str(int(endtimestamp)) datastring += "\n" r = accountinglib.send_to_influx(datastring, logger) @@ -50,5 +52,6 @@ def main(): logger.info(r.text) logger.info(r) + if __name__ == "__main__": main() diff --git a/OpenStack-accounting/usr/local/sbin/manila_extract_accounting.py b/OpenStack-accounting/usr/local/sbin/manila_extract_accounting.py index abf20919..cf6b8fe6 100644 --- a/OpenStack-accounting/usr/local/sbin/manila_extract_accounting.py +++ b/OpenStack-accounting/usr/local/sbin/manila_extract_accounting.py @@ -8,22 +8,24 @@ import datetime import logging + def main(): - '''Processes accounting from Manila''' + """Processes accounting from Manila""" nowtime = time.localtime() logger = accountinglib.get_logger("manila") logger.info("Manila Accounting run start") - starttime=sys.argv[1] + starttime = sys.argv[1] logger.info("Start Time = " + starttime) - endtime=sys.argv[2] + endtime = sys.argv[2] logger.info("End Time = " + endtime) - endyyyymm=datetime.datetime.strptime(endtime,"%Y-%m-%d %H:%M").strftime('%Y-%m') - endtimestamp = time.mktime(datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").timetuple()) - + endyyyymm = datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").strftime("%Y-%m") + endtimestamp = time.mktime( + datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").timetuple() + ) results = accountinglib.get_accounting_data("manila", starttime, endtime, logger) - datastring = '' + datastring = "" logger.info(results) for result in results: logger.info(result) @@ -31,19 +33,19 @@ def main(): datastring += "Accounting" - datastring += ",AvailabilityZone="+result["Availability_zone"] - datastring += ",Project="+result["Project"].replace(' ','\ ') - datastring += ",Department="+department.replace(' ','\ ') - datastring += ",ManilaType="+result["ManilaType"] - datastring += ",ManilaShareType="+result["Share_type"] - datastring += ",YYYY-MM="+ endyyyymm - datastring += " Shares="+str(result["Shares"]) - datastring += ",Share_Seconds="+str(result["Share_Seconds"]) - datastring += ",ManilaGBs="+str(result["Share_GB"] * result['Share_Seconds'] * result["Shares"]) - - - - datastring += " "+str(int(endtimestamp)) + datastring += ",AvailabilityZone=" + result["Availability_zone"] + datastring += ",Project=" + result["Project"].replace(" ", "\ ") + datastring += ",Department=" + department.replace(" ", "\ ") + datastring += ",ManilaType=" + result["ManilaType"] + datastring += ",ManilaShareType=" + result["Share_type"] + datastring += ",YYYY-MM=" + endyyyymm + datastring += " Shares=" + str(result["Shares"]) + datastring += ",Share_Seconds=" + str(result["Share_Seconds"]) + datastring += ",ManilaGBs=" + str( + result["Share_GB"] * result["Share_Seconds"] * result["Shares"] + ) + + datastring += " " + str(int(endtimestamp)) datastring += "\n" r = accountinglib.send_to_influx(datastring, logger) diff --git a/OpenStack-accounting/usr/local/sbin/nova_extract_accounting.py b/OpenStack-accounting/usr/local/sbin/nova_extract_accounting.py index e990a914..1eae67bd 100644 --- a/OpenStack-accounting/usr/local/sbin/nova_extract_accounting.py +++ b/OpenStack-accounting/usr/local/sbin/nova_extract_accounting.py @@ -8,62 +8,82 @@ import datetime import logging + def main(): - '''Processes accounting from Nova''' + """Processes accounting from Nova""" nowtime = time.localtime() logger = accountinglib.get_logger("nova") logger.info("Nova Accounting run start") - starttime=sys.argv[1] + starttime = sys.argv[1] logger.info("Start Time = " + starttime) - endtime=sys.argv[2] + endtime = sys.argv[2] logger.info("End Time = " + endtime) - endyyyymm=datetime.datetime.strptime(endtime,"%Y-%m-%d %H:%M").strftime('%Y-%m') - endtimestamp = time.mktime(datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").timetuple()) - + endyyyymm = datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").strftime("%Y-%m") + endtimestamp = time.mktime( + datetime.datetime.strptime(endtime, "%Y-%m-%d %H:%M").timetuple() + ) results = accountinglib.get_accounting_data("nova", starttime, endtime, logger) - datastring = '' + datastring = "" for result in results: department = accountinglib.project_to_department(result) - instancetype=result['Charge_Unit'] - + instancetype = result["Charge_Unit"] datastring += "Accounting" - datastring += ",AvailabilityZone="+result["AvailabilityZone"] - datastring += ",Project="+result["Project"].replace(' ','\ ') - datastring += ",Department="+department.replace(' ','\ ') - datastring += ",Flavor="+result["Flavor"].replace('.','_') - datastring += ",FlavorPrefix="+result["Flavor"].split('.')[0] - datastring += ",InstanceType="+instancetype - datastring += ",YYYY-MM="+ endyyyymm - datastring += ",Charge_Unit="+ result["Charge_Unit"] - datastring += " VMs="+str(result["VMs"]) - datastring += ",VM_Seconds="+str(result["VM_Seconds"]) - datastring += ",Memory_MB_Seconds="+str(result["Memory_MB"] * result['VM_Seconds']) - datastring += ",Memory_MBs="+str(result["Memory_MB"] * result["VMs"]) - datastring += ",VCPU_Seconds="+str(result["VCPU"] * result['VM_Seconds']) - datastring += ",VCPUs="+str(result["VCPU"] * result["VMs"]) - datastring += ",Swap_Seconds="+str(result["Swap"] * result['VM_Seconds']) - datastring += ",Swaps="+str(result["Swap"] * result["VMs"]) - datastring += ",Root_GB_Seconds="+str(result["Root_GB"] * result['VM_Seconds']) - datastring += ",Root_GBs="+str(result["Root_GB"] * result["VMs"]) - datastring += ",Ephemeral_GB_Seconds="+str(result["Ephemeral_GB"] * result['VM_Seconds']) - datastring += ",Ephemeral_GBs="+str(result["Ephemeral_GB"] * result["VMs"]) - if int( accountinglib.ifnull(result["GPU_Num"],0)) > 0: - datastring += ",GPU_Seconds="+str(float(result["GPU_Num"]) * float(result['VM_Seconds'])) - datastring += ",GPUs=" + str(float(result["GPU_Num"]) * float(result['VMs'])) + datastring += ",AvailabilityZone=" + result["AvailabilityZone"] + datastring += ",Project=" + result["Project"].replace(" ", "\ ") + datastring += ",Department=" + department.replace(" ", "\ ") + datastring += ",Flavor=" + result["Flavor"].replace(".", "_") + datastring += ",FlavorPrefix=" + result["Flavor"].split(".")[0] + datastring += ",InstanceType=" + instancetype + datastring += ",YYYY-MM=" + endyyyymm + datastring += ",Charge_Unit=" + result["Charge_Unit"] + datastring += " VMs=" + str(result["VMs"]) + datastring += ",VM_Seconds=" + str(result["VM_Seconds"]) + datastring += ",Memory_MB_Seconds=" + str( + result["Memory_MB"] * result["VM_Seconds"] + ) + datastring += ",Memory_MBs=" + str(result["Memory_MB"] * result["VMs"]) + datastring += ",VCPU_Seconds=" + str(result["VCPU"] * result["VM_Seconds"]) + datastring += ",VCPUs=" + str(result["VCPU"] * result["VMs"]) + datastring += ",Swap_Seconds=" + str(result["Swap"] * result["VM_Seconds"]) + datastring += ",Swaps=" + str(result["Swap"] * result["VMs"]) + datastring += ",Root_GB_Seconds=" + str( + result["Root_GB"] * result["VM_Seconds"] + ) + datastring += ",Root_GBs=" + str(result["Root_GB"] * result["VMs"]) + datastring += ",Ephemeral_GB_Seconds=" + str( + result["Ephemeral_GB"] * result["VM_Seconds"] + ) + datastring += ",Ephemeral_GBs=" + str(result["Ephemeral_GB"] * result["VMs"]) + if int(accountinglib.ifnull(result["GPU_Num"], 0)) > 0: + datastring += ",GPU_Seconds=" + str( + float(result["GPU_Num"]) * float(result["VM_Seconds"]) + ) + datastring += ",GPUs=" + str( + float(result["GPU_Num"]) * float(result["VMs"]) + ) logger.info(result) - datastring += ",COST=" + str(float(result["GPU_Num"]) * float(result['VM_Seconds']) * float(result["Per_Unit_Cost"]) / float(3600)) + datastring += ",COST=" + str( + float(result["GPU_Num"]) + * float(result["VM_Seconds"]) + * float(result["Per_Unit_Cost"]) + / float(3600) + ) else: - datastring += ",COST=" + str(float(result["VCPU"]) * float(result['VM_Seconds']) * float(result["Per_Unit_Cost"]) / float(3600)) + datastring += ",COST=" + str( + float(result["VCPU"]) + * float(result["VM_Seconds"]) + * float(result["Per_Unit_Cost"]) + / float(3600) + ) datastring += ",GPUs=" + str(0) datastring += ",GPU_Seconds=" + str(0) - - datastring += " "+str(int(endtimestamp)) + datastring += " " + str(int(endtimestamp)) datastring += "\n" r = accountinglib.send_to_influx(datastring, logger) @@ -71,5 +91,6 @@ def main(): logger.info(r.text) logger.info(r) + if __name__ == "__main__": main() diff --git a/OpenStack_irisiam_mapper/var/www/cgi-bin/irisiam-mapper.py b/OpenStack_irisiam_mapper/var/www/cgi-bin/irisiam-mapper.py index d0497a95..c3f6ab62 100644 --- a/OpenStack_irisiam_mapper/var/www/cgi-bin/irisiam-mapper.py +++ b/OpenStack_irisiam_mapper/var/www/cgi-bin/irisiam-mapper.py @@ -16,9 +16,10 @@ def cl(c): - p = Popen(sourcecmd+c, shell=True, stdout=PIPE, env=env) + p = Popen(sourcecmd + c, shell=True, stdout=PIPE, env=env) return p.communicate()[0] + print("Content-Type: application/json") print("") @@ -26,29 +27,29 @@ def cl(c): for i in arguments.keys(): print(i + ": " + arguments[i].value) -assignment_out = cl("openstack role assignment list --project " + quote(project_id) + " -f json") +assignment_out = cl( + "openstack role assignment list --project " + quote(project_id) + " -f json" +) assignments = json.loads(assignment_out) mapping_out = cl("openstack mapping show irisiam -f json") mapping_json = json.loads(mapping_out) -rules = mapping_json['rules'] +rules = mapping_json["rules"] groups_in_project = [] -iam_allowed_groups = { - "groups": [] -} +iam_allowed_groups = {"groups": []} for assignment in assignments: - if assignment['Group'] != "": - groups_in_project.append(assignment['Group']) + if assignment["Group"] != "": + groups_in_project.append(assignment["Group"]) for rule in rules: - locals = rule['local'] - remotes = rule['remote'] + locals = rule["local"] + remotes = rule["remote"] for local in locals: - if local['group']['id'] in groups_in_project: + if local["group"]["id"] in groups_in_project: for remote in remotes: - if remote['type'] == "OIDC-groups": - iam_allowed_groups['groups'].extend(remote['any_one_of']) + if remote["type"] == "OIDC-groups": + iam_allowed_groups["groups"].extend(remote["any_one_of"]) print(json.dumps(iam_allowed_groups)) diff --git a/chatops_deployment/ansible/dev/group_vars/all/vars.yml b/chatops_deployment/ansible/dev/group_vars/all/vars.yml index be355985..577d3f9e 100644 --- a/chatops_deployment/ansible/dev/group_vars/all/vars.yml +++ b/chatops_deployment/ansible/dev/group_vars/all/vars.yml @@ -27,6 +27,7 @@ chatops_github_repos: - check-version-action - cloud-helm-charts - openstack-query-library + - cloud-workshops chatops_gitlab_domain: gitlab.stfc.ac.uk chatops_gitlab_projects: stfc-cloud: diff --git a/chatops_deployment/ansible/prod/group_vars/all/vars.yml b/chatops_deployment/ansible/prod/group_vars/all/vars.yml index 4bb1b4d0..3e539f95 100644 --- a/chatops_deployment/ansible/prod/group_vars/all/vars.yml +++ b/chatops_deployment/ansible/prod/group_vars/all/vars.yml @@ -6,7 +6,7 @@ prometheus_version: "3.2.1" systemd_exporter_version: "0.7.0" terraform_floating_ip: 130.246.214.193 env: prod -chatops_image: "harbor.stfc.ac.uk/stfc-cloud/cloud-chatops:8.0.1" +chatops_image: "harbor.stfc.ac.uk/stfc-cloud/cloud-chatops:9.1.1" chatops_github_repos: stfc: - cloud-deployed-apps @@ -27,6 +27,7 @@ chatops_github_repos: - check-version-action - cloud-helm-charts - openstack-query-library + - cloud-workshops chatops_gitlab_domain: gitlab.stfc.ac.uk chatops_gitlab_projects: stfc-cloud: diff --git a/chatops_deployment/ansible/prod/group_vars/all/vault.yml b/chatops_deployment/ansible/prod/group_vars/all/vault.yml index b6aef369..2831d478 100644 --- a/chatops_deployment/ansible/prod/group_vars/all/vault.yml +++ b/chatops_deployment/ansible/prod/group_vars/all/vault.yml @@ -1,154 +1,154 @@ $ANSIBLE_VAULT;1.1;AES256 -34386331373764653138353433653462343439636266366163376239653939336366346637656434 -3662333135626533333836326530383364393230643161380a346566616236316334383437316261 -39633937633730343064356638326434313932636630306530666630653662323033333564653636 -6531343135613437340a346436363139616163323066623235623961326463363261666162303630 -34323933326461633337393931643165333836373665363639646434343435376161613032323637 -35303433396235623232666332393330636134643037643062643535323161336163613935643466 -34646231653535333962653132383233303536343566636334623332333533303434373237376362 -37326234333132383834616537393264313134613362353036633666383630333633313937323634 -35633133393839376238643238653262373764643033316131613361663536363739663037316430 -37666435396238376531326536313938316336303265653165363564343066633262663135383635 -65353430323337616565313964633663633839633665666132313936663464383638393937666630 -63646530396463633538643965653938333537623633366330356163663565326662353532353966 -35313330336366623661393065366465613463323863393437616265643635363530656336616435 -30393863386335616261346465346635333666313466303666326163646337363863396435343961 -35386639633339656336383763333532623864653432336531373937303330666332383530626438 -37353030306437653965346161373135383532396131316161616332396339646132313965643663 -65393064636563666236623363363563343366646464363965373661393932323737363030303331 -33383061653139313030346134333265653963666638643031323931623433623564643132376265 -38353639653039393232383934336663636366663061386330663738326639633030343732326339 -66653633373639383466363534356166636237613838616463356435396262613037646631636134 -62636238383735636633616230343161336333353633386634323037316632653537396532323431 -35306363386635633733363366396266393639366264336164336535616539396234616461343365 -39626363323635323464376266353932383564373930316537366633636531663036313134633033 -38613935303962393231626539396662633762393261393138353264356537636562656433326663 -32373365356335623937636666313035663265623363323639666430646237633337336461383338 -30663636323838366434613430623461626532316135623464373235663537386163306564633666 -38663962383931363834643532336665303038663239653930346365386238626538323236613639 -64383535383162643335363965613133626334323934303661396564373264626335396364343334 -62653264613961636633353639373536383164656432313761386661323662396139633962323933 -64633330653762636637626164346535633034626162323437313666666432613163356638333663 -63313438643038616162656537626133643764363466393735313535643563663931373635323838 -34626365643964356162623838336337333338303031663631303637316636396363313230343834 -33643464353939376662393562393936323731346536326538393162303533383236653537646436 -37633961386438363037323135613637343864386338303831386439646536386463663863623334 -35633038373264333037306163363131643263646665323739346163323063666130656631376261 -36363661333730666437663536376135323063643132396230643661343635373938353563373662 -30383132393165336161373838653434336662303137653432393138616265383631376130313134 -31376330636236616164363864323538356437613838353066386238623339363131623063346265 -31623136333938373064373364316363373264663261373166323761353137653335336130376336 -33356534623462336338653130633231633638663036306438353461343435613361653834366137 -37383732636632643135303266363535666434333831383562333433353930633063323539333035 -31373734373861663735633635666462383834316538623539323734333330646265383132663135 -62346133616337643838646364656364373663396630623231653430653731346361393635316537 -38643433333139346565656336346131316233333362626532616133396161393539383031323036 -66356135373737636538643666353662306163333232373237353136306666343336643432376635 -32306562366534376138386261313439373930643164623066623831646163323965646162303130 -36303466326230653863353635653466623761343934643935626637646434653537363934383332 -65316432636262663138626262643432666461326637346333386234623438343338626636333234 -62343737393931343161616166613036376533303136653462383730363663613237363661356237 -64376433303766356465316662373831313663353533376666356234383336616231656565376135 -34396435323861653034393134303331373538643462303036306664373966313939616133343563 -36653430663730636466616564303361663434393965363831386264343030366665396563333265 -61366134393761336233643035393535303835393738633966343934346561646264626639326262 -61376134306461623563653430656336333434393439383661333766383438393365333264313537 -35623765336636623261333231343739646131326333636632333765623561326265613032663566 -33626339326230643933366466396264336562653939313865636462646437643439643138633564 -31376236346461616663343138356364626665316236333232313730393239633230373464386239 -32656633343865366432336137643835386535373439646434396634313330616636633364366133 -61366265666463313461613465333233376662326661313439653332666632376565306135306632 -38373165393133313962626636623233356439623963323930303836643465323564646661303830 -66376532666432613036306163653431303336393661623736636265313232303561333939663762 -65323336626563333937363332633734636330353764633435383537393061303138363038616330 -61373537353065643437666464383461616237323166613264633438646335623965333931666632 -33303437353138313231383530356561333262323162366331623433656264636664333336653136 -63356439623734366663333633363266653034613462393633303231663634376139633864326138 -66393836376639323235313363376161303039336261396630396263333432653338656136306665 -39366461646638316536336331376130623863623739306462356338303031363730626438666362 -34653164623664313236383238303163626336363562613666363530316631643436393435663039 -33626566313032373265636138343137616239393034626539643238383731343830356465373636 -38653834663330323062316330353566616537336637613065303732306439353832643463623636 -33623338636565323030353831663635393161356566656263636562633366666662656230346161 -39303832663663653330383131353430623338386139333334613561336239353339393066666136 -65326636626666626138323961316663616530643366303638636532333566336266316464393332 -37333332353366666436353334653061333666303235333230663037643139316663336464343638 -63613635633335376137323362363539363665626666316263626364376539306233613830623164 -38386563323463353864356230636565333732636639643139316138336261383635393235396539 -62306439343264653532386332646464346134653964663735643233313535613139303533303634 -37393364313133363536316630326639393835396430643832343266336534386166383934326362 -35346636636535376336383136373730373638376434376638663564346630363862323161303935 -64396564396566613430653831343231373562313333333138313530626231333435383662313639 -39356265343435376436346438313531363062623030633235393739303763616333333566373439 -38626661306138626438386463343262373930336339613465376361356639393033323036366635 -66393265333334626164386435353234396439363065363038316138303733363964613934353565 -61643863326263663864616231353131626162343234373436616461303934653761623235613362 -30363138636335356331346238323430623765303865316639363639326633366233633937376566 -30353063653536376663323966323836383362383366393534316434613337636633663030633565 -30616639333637326234386263336561616533323136343736333730396666333561616230353064 -31386232623832346339666463363737636461326132326531323734313734656635343937636138 -62363961333132393631323365383962653965636365346663656433613861363732306231653236 -36363633633062353962313366313539313364373264396161316562383366376639623165623033 -39353764396435373933323833646639613035363931313361363361333433623961366231613137 -61663532336336306131623731663762636266373362633866383264656236656232393830376462 -37643862323931396336303164316263346334383962633364636335393439633365363038623936 -65626232343235356331363466306332306633383536316265303634616535666530363632653731 -65333461656236363539393435396263613831333335356366343437623934303138356361353861 -31353861373132373136353433373235303733636462663633346139323163303161613630343634 -39626663303362316634316139636331393030323461316266303066383430626265616664313765 -32396165373161336333663539306461633563626539346234643839663433303039633930383535 -32666463643236343438386230306465363662346131383139356435636133396261656439326437 -64386166313137386534333236346664386661353730623734646139303137313833366635313862 -38363966303339333639663737656430613731353366383961353230643933386338376634313238 -63373262383566663530366239636231323436343638333362653932626262623033626136633933 -63386261306535316138626261363832616534376466356662336235623030393739386232343430 -64663236343932663837336563633238306162336261653432653333393864306662343165376561 -35343036303631636534396633616239656266333730326338626366316436646466393336623065 -39396333323131366235383233363939636631366630376561636333376661336166353531646137 -39616134333435616539666564663863353638623764663836303964353461396566663438343434 -62613137343030323234383037646636646631663033613135366366633164396333626462396238 -36623138643937303162646665353064366461303464633432313265343934396235313935643930 -62383532336335323166656133653538646461363263353761653235393563353931323462373537 -64303233353430623432656462646134323332636536303834323430303636633366363738343965 -64343662373134323865633066393730663132363935346165636663343633396633653836366531 -34663837323262323031393932333063633337383335373166663038376262633830386234653331 -34623861633162333566323532353031633963333935323931663636636638313532373131396465 -30373637353964613636653637333238653033356435376231306231383136656562353661373034 -38653334643739353138303261653862383634316635653239663937363633336663646338303333 -33626565306163386432326635363433663439626136343764313735333933333537303939353436 -31623432623430343663363438326238333862393866343232653661353436643832313561656130 -64666639313533383535353265653938306137386661353030633766633264396663613236393565 -38646637373834633038656238373664643465393635633938393537316438306536306130363666 -36396361346637656131386331366634346466366631326234383131373866666461643461303663 -36363637316336303164333230316462656333623337363230303631613637326430323735323638 -31656561373435333563383139303265623938396263353062313164666562373065636338356434 -66386539316132303765303663383135363439666133343834353765353736643635363661633038 -31653566393464333832613761633764346633383830386132343366313166303763343661326561 -33393932353432376535303531633836373063376566363666393735636461323438396336306664 -32343839353536613162643637383236666631323463373836363837356664633531303562326131 -35363233383235643334666435383061356165356436343764636536643832626134306665396562 -64396565376336313235633566633638383339363265663939396565633564373330646537396635 -37326362363666643264363866353165626664363938663131393432626130343561343763626633 -62643239386262396337396534643366353531333734386236363261333266313834313764323236 -34393965313261306262396364303032366331346164656661636564336635616434383232303133 -63396535313333333538616330333462663166613534616331356139653831316533663362373139 -36353237303634353762633035653537646665376362323866346564386464306234653238626136 -37363737363764353835396130346161616531616334616466613338626232376133653335636432 -37613861623362393236356666646237393934323861626135353538636638663166373365663339 -34326538663063303034346561343263373639313962356333376166366461363230356433343866 -35326539616637356531313439323163653865643037343064366531353632373638323461633935 -34343534623564303033393838303235623036356238336464623564316634343636383766613731 -35656133653034313435346562626439653937333437383331393338353739353166326138303934 -64373537336133373134306462363437636536373165326337316261353362653232316134623033 -35613063626366646564633436666264623233373663633762393835373162613436306533356133 -34616262383561303233306236303139316438353362363937326237386339363337363862633636 -39373733616239663364376335656161393832616633323565393034393639316162383932616635 -63383437393536363938633264663763306634616431616366333332643166303235396135643431 -30353135613933323735626236326337366433383861353035316163626635363065626431373362 -62313133646365343761636135613732633266303839303031613037356662363063356166366331 -39643836383533323938343132313265393337626632396239356361623362313562663061646562 -35633765636364656435623138346337653232333131636531636362316635313534346462616139 -61383763303433323663353666666530616135363631306636353065316535663733313133306464 -61663632303165356437623633393365323630313263353038303461613831373533323333333437 -39376333646532663963396335313538663730376166363133373031313462636230316661303532 -6462 +63646533633064316337633832623935656230333836383132336664393036303638656466626633 +6334646165636230386138643638363839366636613263390a366434396434373339313530363036 +61386264353635643865616662383035623535636336643863303535353030373666656130393435 +3839633731343933340a306536613630616565303838323132356538396636323538393033653039 +36303937376332646230323435386134613932616338326135633338643764313163393339663665 +64636261636331303564343136653736633233383031353330626132383962646162666439353435 +32613738303738306134393666393562633561333964623638366534326439333432386430643462 +35303861336462366330373562616531313666663335376237393461653361333263306461386165 +32363032386432363861643237363839323038643938326639343939323732616161313735616131 +35313963306463653232636262346235343863613662343463623562306533316261656631636232 +34343238393139393862633165663731666339636166303732363862613162663738643166383138 +33363639623863376336373731636465613161626434376361353161393735303466633936623465 +34346535333830623338313634383132633234646632396637383039306162653532353235393332 +63323535643233326663613964623833373237663636643065353064346165663535343234613964 +35306135303637383266383761353330323762343034303136313334336239336465343938383861 +61306631393966366536643563343231376264646136646230613532626238646639376164393432 +62343734663837643163373632616566613761363034323861613263623936343130636364393766 +64663536613065373734303933336365333566323766306239633939623931363530656536346564 +66343930373863363562616332313561646162663830363164306662636464373465396639343663 +30663161316438643637323332366266393430623834383765616363656237626666663431356635 +31383134623937643230303231643030626533303663613034313937653430616338653833383862 +65356365623733313032623766663135353262646435356465643635323738353532323934643731 +64366564323965633132306235333562626230393330636565646435393732396237633539643466 +38323436323239336434633263373938316666356537306565646165373664616563393032393935 +30396638346264393232663461386462353030636338366131303239653930326361613734326264 +63376661656139383337646133633261656262396263303136326133333336346133306239623231 +30333662623162386435306536663462633537363838303532643561386263643536616564656564 +30313765386563393865616164663535303266386530313636363035353931653864323761653937 +65613733643731393466366431633035623165313561613661323030633637326531363133643338 +62383439393764653937303234363937646137346337643739636161373638373332653762373864 +31663761336364616363646331656234316462363033303365393735323238346336336433646361 +31353265663065323634366436636332393835653930326439663431303131303431656666313531 +39386437313562623936393864326462393838323739353438376334323235386634623139333735 +32393830393635393164303761366337623336613635613534343531376334316636306130666266 +65616639326639383835306666623132303466353561326134646632653939386635326438623164 +34303437393538313964373331316564343763373531373635396338636431343430363830353831 +37323931366630656531626566373733636134373738383861333764393633623537393461363738 +35396232306137633032303039366261303963333565633333396337336238373463333830333930 +65316537666265663134643734363336616131326537613463333135383665383337366361346561 +30666339386531316132323161373230376438393636373465636132313337633533363063336233 +35646132313134643131353037616565303238336239633536306665636163336135643732346439 +38663236333031303033393834343762363436376363313733313539326665373136653535333432 +66303635663533353761333838373335333831626233383135633132373666373065326438336666 +66383932643832613430376262633933616132303739336435383866386437383565373161653135 +62336239313161316134396662386639356237363566333763363433653161643133393637666262 +37396435383363613762663234663339306538613162343033643232373530616234373637613533 +35393531333338613564326262333138663538633361336634333333323734646464383530613938 +64663765653264343266383336356235663733636164353333336635643631313838363364666439 +33323238386263363961396431363662386165633263636431313731633934613231373865363338 +39393434636637373238656266393766313737623766313065646230653462303035333762616266 +39343837333136363838393837333566623366666163663861396564626233303932386633623334 +66373033333232346131636164316166633737386161636439386463346564306161356161333564 +30376662316537656234353363633633633239366235306231353463396537343337333638336436 +32393762396533363835616431343531373736633064333734316462623563643361663830633465 +36393666306463393633666630313938653330346663333966333864646234633961343237373632 +32373538623432336438363935323962326639653132353339663866363165373730663265386436 +38333835353938383364356433323638386138636130346130313039646661323430363766616436 +66356639656463346639643535343433633034636332613663313732373039353666353266313930 +31613665646334313635613666633835623537616339303734336134633464363162613337346430 +66663838323938363763373936303261616337363735333636393535303033323132633034353338 +31646366626162663139373761653335633438613338663638373063313762373633386338376565 +31663137306166636536383633666232376338386430613230386337393935313637323539653761 +36376534363231323732363166663735656134613039333566323530373130343731316365623635 +63633834326534343430393761313233363034613032356464623233356531386535666139306437 +39343865343762343733323263323433643532636337396239376163376438346530616330633866 +61383763656533303161316333316339633032326361313762646438656134613534643262313137 +33316534653337336232376462373364653134393338366539326633303334336663303236303639 +31383862396665313161343234373664643637626361613036323938393365643864326131663932 +64353563333366623836643035313430353461643465653065616436366337613733623636396666 +64323262333763623037633461363765663864326132616436623038656265303139653832346235 +66323539616434366533316231616232643937623961663735633837656365303634356338613034 +66333932626237646531663439376532396635333066393463643835333363333434643032616666 +36393531323833316635623339356630376638666233386164643535643037656239333463323463 +38346439373565396232366237373934376331656661353131363532663633313066353631363266 +30653137313532616561383361313238653135323963636631303233643061316434373061366239 +38626639616134633934383866346362303963653863653766323264363034326630626663353962 +63656366366362356233613735303666396537396234616531663637633863633436316430353061 +62323437343663663262616436346237316236336161666135316662623536326162326162646335 +39636131303763336565373038326436366233366633333339393639303865643761363831326637 +32353537363966356438653335393638346137643632326361393931323461313338313262353565 +35613361383234313034613562636430353532333963646132343761646166623737616135373663 +32376661316635656664653736383139343439376137663865393639313032313366336239383932 +32643638303037653132663265633837306461336235306636313137303930646133333934373432 +37613332636139336263313031633939396335343063656533393238353332333837373739333133 +37363564646237333937653163353932343232313138366637663339626163666631303336613235 +62623433393238393064353464363964616633383333363866326163353966383033323165656163 +32323665393566646634393732633961356439623731313534356530393830613139386430333731 +35316661333266336561323033376362626166626463323462333733333834663434643136616666 +39316161303438636166376132623065353131323936343131623231326333323361353737303263 +32303236646466663861653235343831386130663138626633313561346132613539303838323436 +32653630396238633633303466393263313638313564313563626132663039396139303263373031 +38323337663032303039346430303439653861363639326139383562663735376536373739343639 +63323738396238633835623830663132376130313037393133396339663037633665333061663934 +65353238316263376334386537356534303330613766396266366366333762343964376432343734 +63326132343963313564323136616436623536343338623332323336313333633163616235353830 +33373539613638333037313039376566333731373536333430313266353735313238316164303437 +64393866313638313933613938616463386634303133663562373765383865373838376162383565 +32366564383364623764633735326438333238323136613534613030316437303031356133626364 +30373962343631656364623064333134396238663861363532393036316162303162616232613532 +65623233663838623630666438303062626663366565343439363530363565316636666264663563 +62386635663564366466643237363063383934646333643032333931646361623632376161313139 +35613363643338626138316330363936343532363536623166636137373565656565303662653935 +63396535363061326337306636663866326538666164356664653239373532653236323732323864 +34646336663232636632373236383334623135643030363433343466363337393861363937643936 +30306463373231623265373138316331376430376239656331383338613634373031623238323133 +34366635356466343266373834343837626432663536333165363935656136366137346132343863 +38643937396362373966386639373564376564626338353136326237323765323437363664356132 +36363433353736303834626166623461616663393862353338646330376364333465663937633266 +38633435353230313162323033363264383364633936326233386662656533326432653437613365 +30356265633237653066393966346233383961653462366134623164313335373863636235663430 +32306337333737363962313232323038666238336464343863646135393834316335363532323634 +30643862346438393261663866373337323933393137323635623132396664643461373565663465 +61353231636133346561366434373739323465656538336234666532376133626631623737316364 +32663561303032633362326137333130653932623763326632616238323931383531326164356164 +35633361306536623936333839366635333437643239366532333566363166303630303337346561 +35626139393632373936623736306437656466333935366538616565363934643966373937363033 +64663538646330646139376636623231636164366235613731376139613461316261316361393736 +64633466373765313361393137313465303234356139363962663635666464613738313530383533 +32653065626432343238336135373564353263363532326438303531613262333966306233343164 +66633036346532326366373035623064623730306232616634356634626565633637366261303935 +34323038313464323737643733323330356664643361333362613839323737313364376163303032 +65323832376663616133316533623930326333346436336665366338613938343961343839663966 +64323739393833346437616263343064303238613039666638306336656535303732366133613864 +31376566353736383037323762303565623435316434653134323962643662623166376139393137 +65336638363330626661386361346232613137373131333539636534633334353736386463616662 +66386561323530333834343034653161383063393362633238633463626365613432383937663136 +63626264303030303237653037373936336631333737383239626461313335646536623134333235 +62303533383435656663313432323235396537363439636137616331393065373436313134306432 +63626364316132366137653662303935633564383436663438356363303232306465363631353866 +36656136653263623239646234313466323263376239333164633834656430636439373461386633 +39643161653639353432643766636537326265633339613963656431653563353931306462333438 +38353332343438323539623861373165343339313361646630306530346366373734386637333166 +62376337663234663430663161616366646639373661313635633131663839396165336338306666 +62303934313439616637393462393062393037373935326438306366313433323763323765393063 +33656565363934343333363631396161366363353235316164383061313934363330323539333261 +34343933643338633066323136656136666234363135353639396263336132306530626361386634 +35316532336666306334303039623734303539643963653535653039363232643565363434393330 +64343534343034623435666331393434333430346233396433393162323134343433656635323762 +36313531386537663562646434313261353063633763646634663839643532613331333131366234 +37613365353533653832353236666531383536646638663432346533636364323831383939373231 +37393432653234616339626131626430663738346230653337323261376238346433646238306362 +31666665323934333037666432636635666163316331656637343266656537663365626337663265 +62626238333335386163646161663763396238373839353137663038623263613139346363653464 +37646339623162623062653534336135376434313838393731643863353836333463316165343466 +64613561383761653237376633303965303064333063393136356434663637393266373235383636 +62623265633032656530633063393661373639336365323862363732653233313439353939393064 +37356264336330383630326132353437396366383034623134613133636334643262376165646634 +38396161383263323761643331326261343034623262383335303831386232393132663032303934 +39306463383230626562623833343631653635346661393335633331626134363830316235343065 +37653332326538643737373538643838653137626366313064346530326231616337373330663761 +34326136633735633964613136646138363731643439383133616261663131613234376161326534 +63613761383335623836333636333661303235363665353065666631623662303134393036326430 +3339 diff --git a/chatops_deployment/ansible/prod/host_vars/localhost/vars.yml b/chatops_deployment/ansible/prod/host_vars/localhost/vars.yml index 5b67c36d..ac3e4b05 100644 --- a/chatops_deployment/ansible/prod/host_vars/localhost/vars.yml +++ b/chatops_deployment/ansible/prod/host_vars/localhost/vars.yml @@ -1,6 +1,6 @@ --- terraform_deployment: chatops-production terraform_external_network_id: 5283f642-8bd8-48b6-8608-fa3006ff4539 -terraform_stack_volume_id: df3fdff2-30fc-4aca-b8e5-03412a507607 +terraform_stack_volume_id: f3e52dbb-4a20-449c-9c1c-655fd947aa91 bastion_key_passphrase: "{{ vault_bastion_key_passphrase }}" cloud: "cloud-microservices" diff --git a/iriscasttools/iriscasttools/stats.py b/iriscasttools/iriscasttools/stats.py index 478e5805..8c5d2944 100644 --- a/iriscasttools/iriscasttools/stats.py +++ b/iriscasttools/iriscasttools/stats.py @@ -3,6 +3,7 @@ """ Collects energy usage metrics using IPMI, as well as other metrics such as CPU and RAM usage. """ + import argparse import logging from iriscasttools import utils diff --git a/iriscasttools/iriscasttools/utils.py b/iriscasttools/iriscasttools/utils.py index 7ba2298a..18ddddc7 100644 --- a/iriscasttools/iriscasttools/utils.py +++ b/iriscasttools/iriscasttools/utils.py @@ -3,6 +3,7 @@ """ Provides utility functions to collect energy usage information """ + import subprocess import time import os diff --git a/iriscasttools/test/test_utils.py b/iriscasttools/test/test_utils.py index a94a0633..9d2707b7 100644 --- a/iriscasttools/test/test_utils.py +++ b/iriscasttools/test/test_utils.py @@ -3,6 +3,7 @@ """ Tests for utility functions for iriscasttools package """ + import csv import os import pathlib