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
# the following 3 lines of PowerShell creates an Internal Switch on Hyper-V (https://www.petenetlive.com/KB/Article/0001384) | |
New-VMSwitch -SwitchName "NAT-Switch" -SwitchType Internal | |
New-NetIPAddress -IPAddress 192.168.200.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NAT-Switch)" | |
New-NetNAT -Name "NAT-Network" -InternalIPInterfaceAddressPrefix 192.168.200.0/24 | |
# the following line of PowerShell creates a DNAT rule (80->80) from the outside into a VM (previously created an running on the Switch with IP .10) (https://www.petri.com/create-nat-rules-hyper-v-nat-virtual-switch) | |
Add-NetNatStaticMapping -ExternalIPAddress "0.0.0.0/24" -ExternalPort 80 -Protocol TCP -InternalIPAddress "192.168.200.10" -InternalPort 80 -NatName NAT-Network |
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 | |
set -e -x | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update && apt-get upgrade -y | |
echo Building and installing the amazon-efs-utils #(reference: https://gist.github.com/ryanmaclean/c873c9a86f0bc3ee3a260882e73edecb) | |
apt-get -y install git binutils | |
git clone https://github.com/aws/efs-utils | |
cd efs-utils | |
./build-deb.sh |
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
args: { | |
scale_ui: 2 | |
scale_appserver: 3 | |
} | |
containers: { | |
"yelb-ui": { | |
image: "mreferre/yelb-ui:0.7" | |
scale: args.scale_ui | |
ports: |
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
# Inspired by: https://stackoverflow.com/questions/42170380/how-to-add-users-to-kubernetes-kubectl | |
# this script creates a service account (user1) on a Kubernetes cluster (tested with AWS EKS 1.9) | |
# prereqs: a kubectl ver 1.10 installed and proper configuration of the heptio authenticator | |
# this has been tested on Linux in a Cloud9 environment (for MacOS the syntax may be slightly different) | |
************************************************** | |
******* Create an account ******* | |
************************************************** | |
# Create service account for user user1 | |
kubectl create sa user1 |
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: v1 | |
kind: Service | |
metadata: | |
name: redis-server | |
labels: | |
app: redis-server | |
tier: cache | |
spec: | |
type: ClusterIP | |
ports: |
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
# For more information on configuration, see: | |
# * Official English Documentation: http://nginx.org/en/docs/ | |
# * Official Russian Documentation: http://nginx.org/ru/docs/ | |
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. |
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: 'EC2 Postgres and EC2 Redis deployments for Yelb backends' | |
Parameters: | |
KeyName: | |
Description: Name of an existing EC2 KeyPair to enable SSH access to the instance | |
(where applicable) | |
Type: AWS::EC2::KeyPair::KeyName | |
ConstraintDescription: Can contain only ASCII characters. | |
InstanceType: |
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 alpine | |
MAINTAINER massimo@it20.info | |
# Set ENV_VAR for Greengrass RC to be untarred inside Docker Image | |
ARG greengrass_release | |
ENV GREENGRASS_RELEASE=${greengrass_release} | |
# This Dockerfile builds a GG image for the ARMv7 platform | |
# curl this file: https://d1onfpft10uf5o.cloudfront.net/greengrass-core/downloads/1.7.0/aws-greengrass-docker-1.7.0.tar.gz | |
# untar it |
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
# This should work on Kubernetes deployments on AWS that have an ALB ingress controller as well as App Mesh components deployed. | |
apiVersion: appmesh.k8s.aws/v1beta1 | |
kind: Mesh | |
metadata: | |
name: MESH_NAME | |
--- | |
apiVersion: appmesh.k8s.aws/v1beta1 | |
kind: VirtualNode | |
metadata: | |
name: nginx-v1 |
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
# This should work on Kubernetes deployments on AWS that have an ALB ingress controller as well as App Mesh components deployed. | |
apiVersion: appmesh.k8s.aws/v1beta1 | |
kind: Mesh | |
metadata: | |
name: MESH_NAME | |
--- | |
apiVersion: appmesh.k8s.aws/v1beta1 | |
kind: VirtualNode | |
metadata: | |
name: yelb-ui-node |
NewerOlder