Skip to content

Instantly share code, notes, and snippets.

View rulai-jianfang's full-sized avatar

Jian Fang rulai-jianfang

  • Rul.ai
  • Campbell, ca 95008
View GitHub Profile
@rulai-jianfang
rulai-jianfang / aws_create_site.yml
Created April 23, 2019 21:56 — forked from ruzickap/aws_create_site.yml
Ansible playbook which creates instances and tag volumes
---
- name: Create Instance in AWS
hosts: localhost
connection: local
gather_facts: false
vars:
aws_access_key: "xxxxxx"
aws_secret_key: "xxxxxx"
security_token: "xxxxxx"
@rulai-jianfang
rulai-jianfang / awslogs.md
Created April 22, 2019 17:41 — forked from achautha/awslogs.md
Monitor Docker container logs with AWS CloudWatch

Monitor Docker container logs with AWS CloudWatch

In this post, we are going to see how to monitor docker logs from AWS Cloudwatch logs. Docker supports different logging drivers one of which is awslogs

For this excersice, Docker container need NOT be running on EC2. We can send docker logs from anywhere to AWS.

Prerequisite

  • Ubuntu 14.04
  • Docker version 1.12 and above
@cablespaghetti
cablespaghetti / gist:54de0ae93449e4698f0206a0e85514be
Last active November 2, 2022 14:20
Example terraform for ASG with spot instances
#
# Configuration for Autoscaling group.
#
resource "aws_launch_template" "eks-cluster-worker-nodes" {
iam_instance_profile = { name = "${aws_iam_instance_profile.eks-cluster-worker-nodes.name}" }
image_id = "${data.aws_ami.eks-worker.id}"
name = "${var.cluster-name}-eks-cluster-worker-nodes"
vpc_security_group_ids = ["${aws_security_group.eks-cluster-worker-nodes.id}"]
key_name = "${var.ssh-key-name}"
instance_type = "${local.host-types[0]}"
@Mahedi-61
Mahedi-61 / cuda_11.8_installation_on_Ubuntu_22.04
Last active April 29, 2024 16:34
Instructions for CUDA v11.8 and cuDNN 8.9.7 installation on Ubuntu 22.04 for PyTorch 2.1.2
#!/bin/bash
### steps ####
# Verify the system has a cuda-capable gpu
# Download and install the nvidia cuda toolkit and cudnn
# Setup environmental variables
# Verify the installation
###
### to verify your gpu is cuda enable check
@thilinapiy
thilinapiy / mongo-statefulset.yaml
Created October 27, 2017 12:21
MongoDB statefulset for kubernetes with authentication and replication
## Generate a key
# openssl rand -base64 741 > mongodb-keyfile
## Create k8s secrets
# kubectl create secret generic mongo-key --from-file=mongodb-keyfile
---
apiVersion: v1
kind: Service
metadata:
name: mongo
labels:
@enisozgen
enisozgen / ansible-nested-variable.yml
Last active November 4, 2023 10:21
Ansible example which shows how to reach nested variable with dynamic elements
# Example which shows how to reach nested ansible variable which is partially different.
# Run that plabook with ansible-playbook -e "env=test" ansible-nested-variable.yml
---
#
- hosts: localhost
connection : ssh
gather_facts: no
vars:
cidr_blocks:
vpc_production_cidr_block: "10.10.0.0/28"
@rbq
rbq / docker.yaml
Last active October 19, 2023 11:57
Install Docker CE on Ubuntu using Ansible
---
- hosts: all
tasks:
- name: Install prerequisites for Docker repository
apt:
name: ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2', 'software-properties-common']
update_cache: yes
- name: Add Docker GPG key
apt_key:
@ruzickap
ruzickap / aws_create_site.yml
Created February 16, 2017 12:35
Ansible playbook which creates instances and tag volumes
---
- name: Create Instance in AWS
hosts: localhost
connection: local
gather_facts: false
vars:
aws_access_key: "xxxxxx"
aws_secret_key: "xxxxxx"
security_token: "xxxxxx"
@achautha
achautha / awslogs.md
Last active February 21, 2022 02:32
Monitor Docker container logs with AWS CloudWatch

Monitor Docker container logs with AWS CloudWatch

In this post, we are going to see how to monitor docker logs from AWS Cloudwatch logs. Docker supports different logging drivers one of which is awslogs

For this excersice, Docker container need NOT be running on EC2. We can send docker logs from anywhere to AWS.

Prerequisite

  • Ubuntu 14.04
  • Docker version 1.12 and above
@leonardofed
leonardofed / README.md
Last active April 29, 2024 10:49
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.