Skip to content

Instantly share code, notes, and snippets.

View ardeshir's full-sized avatar
🎯
Focusing

sepahsalar ardeshir

🎯
Focusing
View GitHub Profile

Frontend Masters: AWS for Frontend Engineers

You should have the following completed on your computer before the workshop:

  • Install the AWS CLI.
  • Have Node.js installed on your system. (Recommended: Use nvm.)
    • Install yarn with brew install yarn.
  • Create an AWS account. (This will require a valid credit card.)
  • Create a Travis CI account. (This should be as simple as logging in via GitHub).
@ardeshir
ardeshir / setup.sh
Created May 14, 2018 16:31 — forked from mlabouardy/setup.sh
Setup CloudWatch alarm with AWS CLI
aws cloudwatch put-metric-alarm --region us-east-1
--alarm-name "HighCPUUtilization"
--alarm-description "High CPU Utilization"
--actions-enabled
--alarm-actions "TOPIC_ARN"
--metric-name "CPUUtilization"
--namespace AWS/EC2 --statistic "Average"
--dimensions "Name=InstanceName,Value=demo"
--period 60
--evaluation-periods 60

Project 1 : Build a Docker Image for Sysfoo

Link to Application Source: https://github.com/schoolofdevops/sysfoo

Description:

Sysfoo is a java based web application, which uses maven as a build tool. The build specifications are provided with pom.xml in the root directory of the project. Your job is to write a dockerfile to build and package the sysfoo application.

@ardeshir
ardeshir / fix-kube-dashboard.md
Created September 25, 2017 18:52 — forked from initcron/fix-kube-dashboard.md
Fix kubernetes Dashboard
kubectl apply -f https://gist.githubusercontent.com/initcron/db8f1bbb5a884a91032cf53cd496a395/raw/aad04d509a751b2ea0cfbf3dbaa6330a1b37699d/dash-svc.yml
kubectl describe svc kdash  -n kube-system
@ardeshir
ardeshir / story.md
Created September 14, 2017 19:38 — forked from posener/go-shebang-story.md
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

---
# tasks file for app_service_setup
#
- block:
- name: Deploy application service script
template:
src: service.j2
dest: /etc/init.d/app-{{ app_name }}
owner: root
group: root
---
# tasks file for app_service_setup
#
- block:
- name: Deploy application service script
template:
src: service.j2
dest: /etc/init.d/app-{{ app_name }}
owner: root
group: root
@ardeshir
ardeshir / java-8-ami.md
Created July 7, 2017 18:15 — forked from rtfpessoa/java-8-ami.md
[Guide] Install Oracle Java (JDK) 8 on Amazon EC2 Ami
@ardeshir
ardeshir / Deploy-Windows-Service-Via-MSBuild.proj.xml
Created May 23, 2017 15:26 — forked from mrchief/Deploy-Windows-Service-Via-MSBuild.proj.xml
MSBuild Script to deploy Windows Service to remote or local machine
<Project DefaultTargets="CopyOutputs;DeployService" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<!-- These settings control what the service's name, description etc appear in services.msc task panel. -->
<PropertyGroup Label="ServiceMetaData">
<ServiceName>ShinyNewService</ServiceName>
<ServiceDisplayName>Shiny New Service</ServiceDisplayName>
<ServiceDescription>A shiny new service, that changes the world for the greater good.</ServiceDescription>
</PropertyGroup>
<Choose>
@ardeshir
ardeshir / README.md
Created March 30, 2017 19:48 — forked from sapessi/README.md
Continuous deployment of React websites to Amazon S3

Continuous deployment of React websites to Amazon S3

This sample includes a continuous deployment pipiline for websites built with React. We use AWS CodePipeline, CodeBuild, and SAM to deploy the application. To deploy the application to S3 using SAM we use a custom CloudFormation resource.

Files included

  • buildspec.yml: YAML configuration for CodeBuild, this file should be in the root of your code repository
  • configure.js: Script executed in the build step to generate a config.json file for the application, this is used to include values exported by other CloudFormation stacks (separate services of the same application).
  • index.js: Custom CloudFormation resource that publishes the website to an S3 bucket. As you can see from the buildspec and SAM template, this function is located in a s3-deployment-custom-resource sub-folder of the repo
  • app-sam.yaml: Serverless Application model YAML file. This configures the S3 bucket and the cu