Skip to content

Instantly share code, notes, and snippets.

View lusoal's full-sized avatar
🏠
Working from home

Lucas Duarte lusoal

🏠
Working from home
View GitHub Profile

Deploying Sample App with Copilot

Install AWS Copilot

Clique aqui para mais informações de como instalar.

Clone the demonstration app repository

git clone https://github.com/aws-samples/amazon-ecs-cli-sample-app.git demo-app && cd demo-app
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: containerd-cluster
region: us-east-1
version: '1.21'
availabilityZones: ['us-east-1a', 'us-east-1b', 'us-east-1c', 'us-east-1d']
iam:
withOIDC: true
managedNodeGroups:
controller:
ingressClassResource:
name: nginx-internal # default: nginx
enabled: true
default: false
controllerValue: "k8s.io/ingress-nginx-internal" # default: k8s.io/ingress-nginx
service:
enabled: true
## If enabled is adding an appProtocol option for Kubernetes service. An appProtocol field replacing annotations that were
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: magalu-dr-env
region: sa-east-1
version: '1.20'
vpc:
id: "" # (optional, must match VPC ID used for each subnet below)
@lusoal
lusoal / serpro-workshop.md
Last active July 29, 2021 19:07
Serpro workshop
dataset_car_path_ec2 = "/home/ec2-user/SageMaker/sagemaker-advanced-workshop/labs/01-sagemaker-introduction/datasetcars"
dataset_car_path_s3 = f"{prefix}/datasetcars"
def upload_to_s3_new(channel, file, file_name):
s3 = boto3.resource('s3')
data = open(file, 'rb')
key = f'{channel}/{file_name}'
s3.Bucket(bucket).put_object(Key=key, Body=data)
images = os.listdir(dataset_car_path_ec2)
@lusoal
lusoal / eks-create-cluster-eksctl.yaml
Last active August 5, 2020 11:27
Yaml for EKS cluster creation using eksctl
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: eksworkshop-eksctl
region: us-east-1
version: "1.17"
managedNodeGroups:
@lusoal
lusoal / CloneRepository.groovy
Created May 31, 2019 18:04
jenkinsfile-shared-lib-example
#!groovy
@Library('my_lib') _
gitCloneExample {
FOLDER_NAME = "JenkinsShared"
REPO_URL = "https://github.com/lusoal/jenkins_shared_libs_example.git"
REPO_NAME = "jenkins_shared_libs_example"
BRANCH = "master"
}
@lusoal
lusoal / Git.groovy
Created May 31, 2019 17:55
Git SharedLib Jenkins
#!groovy
package libs.git;
def String cloneAndCheckout(String REPO, String REPO_NAME, String BRANCH){
script {
sh "git clone --depth 1 ${REPO} && cd ${REPO_NAME} && git checkout ${BRANCH}"
PWD = sh (
script: "cd ${REPO_NAME} && pwd",
returnStdout: true
).trim()
@lusoal
lusoal / gitCloneExample.groovy
Created May 31, 2019 17:41
Call Function Jenkins Shared Libs
#!groovy
def call(body) {
//Parser Configuration Received from Pipeline
def config = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = config
body()
//Instanciate Objects from Libs
def git = new libs.git.Git()