Skip to content

Instantly share code, notes, and snippets.

View congnt24's full-sized avatar
💭
exploring

Cong Nguyen congnt24

💭
exploring
  • Hanoi
View GitHub Profile
#cloud-config
hostname: CongntCoreOS
users:
- name: congnt24
passwd: $1$AgMKJAA5$/18oT4P7kOS3tp9YeElSV0
groups:
- sudo
- docker
@congnt24
congnt24 / Config-Coreos-Cluster.md
Created February 23, 2018 04:40 — forked from DenisIzmaylov/NOTES.md
Step By Step Guide to Configure a CoreOS Cluster From Scratch

Step By Step Guide to Configure a CoreOS Cluster From Scratch

This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.

Content

@congnt24
congnt24 / app.js
Created May 21, 2018 14:53 — forked from acdlite/app.js
Quick and dirty code splitting with React Router v4
// getComponent is a function that returns a promise for a component
// It will not be called until the first mount
function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
componentWillMount() {
if (!this.state.Component) {
getComponent().then(Component => {
git clone https://github.com/vfarcic/k8s-specs.git
cd k8s-specs
git pull
open "https://console.aws.amazon.com/iam/home#/security_credential"
export AWS_ACCESS_KEY_ID=[...]
@congnt24
congnt24 / rancher-cli
Created August 13, 2018 02:47
dockerfile for install rancher cli
# Set base image.
FROM alpine:latest
MAINTAINER Dominik Hahn <[email protected]>
# Define rancher version
ENV RANCHER_CLI_VERSION=v0.6.9
# Install dependencies and rancher
RUN apk add --quiet --no-cache ca-certificates && \
@congnt24
congnt24 / konga.yaml
Created August 19, 2018 08:02
Install Konga on Kubernetes cluster
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: konga
spec:
replicas: 1
template:
metadata:
labels:
name: konga
@congnt24
congnt24 / kong_postgres.yaml
Created August 19, 2018 08:04
Install Kong with type ClusterIP
apiVersion: v1
kind: Service
metadata:
name: kong-proxy
spec:
ports:
- name: kong-proxy
port: 8000
targetPort: 8000
protocol: TCP
@congnt24
congnt24 / docker-compose-zk-kafka-cluster.yml
Created January 19, 2019 14:10
Configure zookeeper and kafka cluster
---
version: '2'
services:
zk1:
image: confluentinc/cp-zookeeper:5.1.0
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 22181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_INIT_LIMIT: 5
@congnt24
congnt24 / docker-compose-kafka-cluster.yml
Created January 19, 2019 14:11
1 zookeeper, 3 kafka
---
version: '2'
services:
zk1:
image: confluentinc/cp-zookeeper:5.1.0
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 22181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_INIT_LIMIT: 5
@congnt24
congnt24 / web-servers.md
Created March 10, 2019 05:04 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000