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 | |
| for pkg in build-essential libssl-dev zlib1g-dev; do | |
| if ! dpkg-query -W -f='${Status}' "$pkg" 2>/dev/null | grep -q "ok installed"; then | |
| apt-get install -y "$pkg" | |
| apt-mark auto "$pkg" | |
| fi | |
| done | |
| cd /opt | |
| wget https://www.python.org/ftp/python/3.8.20/Python-3.8.20.tgz | |
| tar -xf Python-3.8.20.tgz |
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
| Resources: | |
| CustomResourceRole: | |
| Type: AWS::IAM::Role | |
| Properties: | |
| AssumeRolePolicyDocument: | |
| Version: '2012-10-17' | |
| Statement: | |
| - Effect: Allow | |
| Principal: | |
| Service: 'lambda.amazonaws.com' |
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
| # Sources: | |
| # https://cloudonaut.io/how-to-create-a-customized-cloudwatch-dashboard-with-cloudformation/ | |
| # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html | |
| # https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ECS.html | |
| Resources: | |
| CustomTaskDefinition: | |
| Type: 'Custom::TaskDefinition' | |
| Version: '1.0' | |
| Properties: |
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 | |
| container=$(docker run -d -p 80:80 ynohat/git-http-backend) | |
| docker exec ${container} sh -c "cd git && git init --bare $1.git && cd $1.git && git config http.receivepack true" | |
| repo=$(curl -s https://$PWD_HOST_FQDN/sessions/$SESSION_ID | jq -r ".instances | to_entries[0].value | \"http://\" + .proxy_host + \"-80.direct.$PWD_HOST_FQDN/git/$1.git\"") | |
| mkdir -p /root/htdocs/ | |
| echo "<h1>$1.git</h1>" >> /root/htdocs/index.html |
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 io.vertx.starter; | |
| import com.uber.jaeger.Configuration; | |
| import com.uber.jaeger.micrometer.MicrometerMetricsFactory; | |
| import com.uber.jaeger.samplers.ConstSampler; | |
| import io.micrometer.core.instrument.Metrics; | |
| import io.micrometer.prometheus.PrometheusConfig; | |
| import io.micrometer.prometheus.PrometheusMeterRegistry; | |
| import io.opentracing.Span; | |
| import io.opentracing.Tracer; |