This file contains 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: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: split-traffic-ingress | |
annotations: | |
nginx.ingress.kubernetes.io/rewrite-target: / | |
spec: | |
ingressClassName: webapprouting.kubernetes.azure.com | |
rules: | |
- http: |
This file contains 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
# Example: | |
# spark.master spark://master:7077 | |
# spark.eventLog.enabled true | |
# spark.eventLog.dir hdfs://namenode:8021/directory | |
# spark.serializer org.apache.spark.serializer.KryoSerializer | |
# spark.driver.memory 5g | |
# spark.executor.extraJavaOptions -XX:+PrintGCDetails -Dkey=value -Dnumbers="one two three" | |
spark.driver.extraClassPath /glue/aws-glue-libs/jarsv1/* | |
spark.executor.extraClassPath /glue/aws-glue-libs/jarsv1/* |
This file contains 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
import json | |
import boto3 | |
ec2_client = boto3.client('ec2') | |
client = boto3.client('resourcegroupstaggingapi') | |
def lambda_handler(event, context): | |
# TODO implement | |
ec2_instances = client.get_resources( | |
TagFilters=[ |
This file contains 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
[Unit] | |
Description=Example .NET Web API App running on Amazon Linux | |
[Service] | |
WorkingDirectory=/home/ec2-user/letsdotnet | |
ExecStart=/usr/bin/dotnet /home/ec2-user/letsdotnet/LetsDotNet.dll | |
Restart=always | |
# Restart service after 10 seconds if the dotnet service crashes: | |
RestartSec=10 |
This file contains 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 mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env | |
WORKDIR /app | |
COPY *.csproj ./ | |
RUN dotnet restore | |
COPY . ./ | |
RUN dotnet publish -c Release -o output | |
# Runtime image | |
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 | |
WORKDIR /app |
This file contains 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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "", | |
"Parameters" : { | |
}, | |
"Resources" : { | |
"IISServer" : { | |
"Type" : "AWS::EC2::Instance", | |
"Metadata" : { | |
"AWS::CloudFormation::Init" : { |
This file contains 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
{ | |
"customer-id" :"0123", | |
"invoice-number" : "567", | |
"line-items" : { | |
"line-1" : "book1", | |
"line-2" : "book2", | |
"line-3" : "book3" | |
} |
This file contains 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 | |
sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' | |
apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 | |
apt-get update -y | |
apt-get install dotnet-dev-1.0.0-preview2-003131 -y | |
bash <(curl -fsSL https://raw.githubusercontent.com/PowerShell/PowerShell/v6.0.0-alpha.10/tools/download.sh) | |
apt-get update | |
apt-get install python-pip | |
apt-get install ruby2.0 | |
apt-get install wget |
This file contains 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 | |
yum install -y aws-cli | |
cd /home/ec2-user/ | |
aws s3 cp 's3://aws-codedeploy-us-east-1/latest/codedeploy-agent.noarch.rpm' . --region us-east-1 | |
yum -y install codedeploy-agent.noarch.rpm |