Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
Sunnyvale

Lei Zhang (Harry) resouer

🏡
Sunnyvale
View GitHub Profile
@resouer
resouer / app.yaml
Last active Jun 8, 2021
A sample Open Application Model (OAM) deployment plan
View app.yaml
apiVersion: core.oam.dev/v1
kind: Application
metadata:
name: awesome-blog
spec:
components:
- name: web
type: helm-chart
properties:
image: bitnami/wordpress
@resouer
resouer / platform.md
Last active Nov 30, 2020
My dream platform
View platform.md

My dream platform:

  1. Single binary install on nodes, and easy to join them into a cluster.

  2. Resources defined as JSON with comments in a simple format with JSON Schema URLs denoting resource types - I should be able to run 1 container with 3 lines of resource definition.

  3. Everything as a CRD... No resources or funcionality pre-installed and instead available via publicly hosted HTTPS schema URLs.

  4. Pluggable / auto-installed runtimes based on the schema URL or a "runtime" field: containers, vms, firecracker, wasm, maybe even bare processes, etc.

View vela.yaml
name: _my-app-name_
services:
_my-service-name_:
build:
docker:
file: _Dockerfile_name_
context: _Dockerfile_path_
View CUE OAM App
myapp: {
components: {
frontend: {
containerized:{
image: "nginx:v1"
port: "8080"
}
traits: {
route: {
domain: "www.example.com"
View rudr --help
```console
$ rudr --help
✈️ A Micro App Plafrom for Kubernetes.
Commands
Getting Started 🌱
env Set your enviroment (e.g. dev,stage,prod).
docs Open the rudr docs.
View kn-app.yaml
---
apiVersion: core.oam.dev/v1alpha1
kind: WorkloadDefinition
metadata:
name: service.serving.knative.dev
spec:
definitionRef:
# reference to the name of real-world crd
name: service.serving.knative.dev
---
View hello-world-app-old.yaml
# -------------------------- Step 1: Define and install WorkloadType and Trait ---------------------
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: radius.cache.crossplane.io
annotations:
core.oam.dev/oam-type: WorkloadType
scope: Namespaced
names:
View hello-world-app-new.yaml
# Step 1: Define and install WorkloadType and Trait
---
apiVersion: core.oam.dev/v1alpha1
kind: WorkloadType
metadata:
name: cache.crossplane.io/v1.Radius # we endorse G/V/K convension as WorkloadType name
spec:
schematic: |
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
View first-app.yaml
apiVersion: core.oam.dev/v1alpha1
kind: ApplicationConfiguration
metadata:
name: first-app
spec:
components:
- componentName: helloworld-python-v1
instanceName: first-app-helloworld-python-v1
parameterValues:
- name: target
@resouer
resouer / INSTALL.txt
Created Nov 18, 2018 — forked from fernandoaleman/INSTALL.txt
Shell script to sync remote branches from upstream and push them up to forked origin
View INSTALL.txt
1. Copy 'git-sync-fork' script code from gist
2. Create a file called 'git-sync-fork' in any 'bin' directory in your $PATH
3. Paste script into this new file 'git-sync-fork' and save
4. Make the file executable `chmod +x git-sync-fork`
5. Run the script inside your locally forked git repo
Example:
git-sync-fork upstream origin