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.
This file contains hidden or 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: kong-proxy | |
spec: | |
ports: | |
- name: kong-proxy | |
port: 8000 | |
targetPort: 8000 | |
protocol: TCP |
This file contains hidden or 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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: konga | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
name: konga |
This file contains hidden or 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
# 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 && \ |
This file contains hidden or 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
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=[...] |
This file contains hidden or 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
// 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 => { |
This file contains hidden or 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
#cloud-config | |
hostname: CongntCoreOS | |
users: | |
- name: congnt24 | |
passwd: $1$AgMKJAA5$/18oT4P7kOS3tp9YeElSV0 | |
groups: | |
- sudo | |
- docker |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
This file contains hidden or 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
SELECT | |
*, | |
(SELECT json_build_object('id', ref.user_id, 'email', ref.email) | |
FROM user_profile_with_referal ref | |
WHERE customer_id = 84061) AS referal_info | |
FROM user_profile_full | |
WHERE user_id = 84061; |
This file contains hidden or 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
# Need to do the following steps: | |
# 1. create /var/prometheus first. | |
# 2. run: docker-compose run promdash ./bin/rake db:migrate | |
nodeexporter: | |
image: prom/node-exporter | |
ports: | |
- "9100:9100" | |
prometheus: | |
image: prom/prometheus |