Skip to content

Instantly share code, notes, and snippets.

View pacroy's full-sized avatar

Chairat Onyaem (Par) pacroy

View GitHub Profile
@pacroy
pacroy / test
Created October 21, 2020 13:38
Test
Hello, world!

Cotton command: cotton -u https://services.odata.org -d northwind_customers.md

1. List Northwind Customers

GET /V2/Northwind/Northwind.svc/Customers/?$format=json&$top=10

Query first 10 customers

Expectation

apiVersion: v1
kind: Template
metadata:
name: example-voting-app-template
objects:
- apiVersion: v1
data:
database-name: ZGI=
database-password: cG9zdGdyZXNfcGFzc3dvcmQ=
database-user: cG9zdGdyZXNfdXNlcg==
version: '3.1' # if no version is specificed then v1 is assumed. Recommend v2 minimum
services: # containers. same as docker run
servicename: # a friendly name. this is also DNS name inside network
image: # Optional if you use build:
command: # Optional, replace the default CMD specified by the image
environment: # Optional, same as -e in docker run
volumes: # Optional, same as -v in docker run
servicename2:
# Instructions from the app developer
# - you should use the 'node' official image, with the alpine 6.x branch
FROM node:6-alpine
# - this app listens on port 3000, but the container should launch on port 80
# so it will respond to http://localhost:80 on your computer
EXPOSE 3000
# - then it should use alpine package manager to install tini: 'apk add --update tini'
# - then it should create directory /usr/src/app for app files with 'mkdir -p /usr/src/app'
version: '2'
# same as
# docker run -p 80:4000 -v $(pwd):/site bretfisher/jekyll-serve
services:
jekyll:
image: bretfisher/jekyll-serve
volumes:
- .:/site
curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 606 0 606 0 0 497 0 --:--:-- 0:00:01 --:--:-- 497
100 72.4M 100 72.4M 0 0 6767k 0 0:00:10 0:00:10 --:--:-- 13.2M
$ wget https://storage.googleapis.com/kubernetes-release/release/v1.6.1/bin/linux/amd64/kubectl
--2018-03-19 13:34:24-- https://storage.googleapis.com/kubernetes-release/release/v1.6.1/bin/linux/amd64/kubectl
Resolving storage.googleapis.com (storage.googleapis.com)... 74.125.200.128, 2404:6800:4003:c00::80
Connecting to storage.googleapis.com (storage.googleapis.com)|74.125.200.128|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 70704507 (67M) [application/octet-stream]
Saving to: 'kubectl'
kubectl 100%[=================================================>] 67.43M 68.7MB/s in 1.0s
@pacroy
pacroy / manifest.yml
Last active October 1, 2017 04:17
manifest.yml
---
applications:
- name: app12345
memory: 512M
instances: 1
path: target/application.jar
env:
SPRING_PROFILES_DEFAULT: cf
package com.pacroy.helloscp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class HelloScpApplication extends SpringBootServletInitializer {