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/bin/env python | |
| from colorama import Fore, Back, Style | |
| # from kubernetes import client, config | |
| import kubernetes | |
| import json | |
| import yaml | |
| import subprocess | |
| project_name = "default" |
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
| version: '3' | |
| services: | |
| influxdb: | |
| image: influxdb:latest | |
| ports: | |
| - '8086:8086' | |
| volumes: | |
| - /opt/hog/influxdb-storage:/var/lib/influxdb | |
| environment: | |
| - INFLUXDB_DB=db0 |
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
| package hssm | |
| import ( | |
| "fmt" | |
| "regexp" | |
| "encoding/json" | |
| "github.com/aws/aws-sdk-go/aws/awserr" | |
| "github.com/aws/aws-sdk-go/service/ssm" |
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 deploy_app(self, **kwargs): | |
| values = kwargs['values'] | |
| app_name = kwargs['app_name'] | |
| project_id = kwargs['project_id'] | |
| helm_chart_url = kwargs['helm_chart_url'] | |
| target_namespace = kwargs['target_namespace'] | |
| app = { | |
| 'name': app_name, | |
| 'type': 'app', |
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/bin/env bash | |
| source ~/.aws/aws_env | |
| aws stepfunctions start-execution \ | |
| --state-machine-arn arn:aws:states:us-east-1:1234:stateMachine:insight \ | |
| --input "$(cat step_input.json)" |
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
| { | |
| "edge_id": "fa01ff46-b5a7-4c82-ac3b-da533b4780a8", | |
| "edge_name": "Raythe" | |
| } |
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/bin/env bash | |
| cd /var/lib/grafana/plugins | |
| for plugin in "camera-player" "grafana-compare-queries" "grafana-trackmap-panel" | |
| do | |
| aws s3 cp s3://company-missioncontrol/grafana/plugins/${plugin}.tar.gz ./ | |
| tar -xzpf ${plugin}.tar.gz | |
| done |
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 debian:latest | |
| RUN mkdir -p /opt/company | |
| WORKDIR /opt/company | |
| RUN apt-get update && \ | |
| apt-get install -y python3 python3-pip | |
| RUN python3 -m pip install awscli | |
| ADD install-plugins.sh . |
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
| cls_name = f"{chart.capitalize()}Deployment" | |
| log.debug(f"Class: {cls_name}") | |
| module = importlib.import_module(f"lib.trp.cloud.{chart}") | |
| deployment = getattr(module, cls_name)( | |
| log=log, | |
| namespace=params['namespace'], | |
| cluster_name=params['cluster_name'] | |
| ) | |
| deployment.deploy() |
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
| class ThingDeployment(GenericDeployment): | |
| def __init__(self, **kwargs): | |
| super(ThingDeployment, self).__init__(**kwargs) | |
| def deploy(self): | |
| values = self.render_template("thing/specific_thing/thing", self.variable_context) | |
| helm_chart_url = self.get_helm_chart_url( | |
| repo="artifactory", | |
| version="0.4.0", |