Skip to content

Instantly share code, notes, and snippets.

Avatar

Antonio arosales

View GitHub Profile
View gist:aa237066a3a8e5114acf1c4c8de00c85
# I install the droplet based Wordpress 1-click on a $5 droplet (1GB mem / 1 CPU) in SFO2 with an ssh key.
# I can successfully ssh into the droplet, and see the unconfigured Wordpess app at the droplet IP.
https://imgur.com/ZqYtmC0
~ ❯ ssh root@138.68.48.168
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-58-generic x86_64)
* Documentation: https://help.ubuntu.com
View wp get attributes
NAME: click
LAST DEPLOYED: Thu Nov 14 00:41:31 2019
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Get the WordPress URL:
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace default -w click-wordpress'
View Nginx Ingress Getting Started
# Verify Nginx Ingress was installed correctly:
kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx ⏎
# example output:
NAMESPACE NAME READY STATUS RESTARTS AGE
ingress-nginx nginx-ingress-controller-7fb85bc8bb-4s2sl 1/1 Running 0 152m
# Get IP of the Nginx Ingress LoadBalancer:
kubectl get svc ingress-nginx -n ingress-nginx -o jsonpath='{.status.loadBalancer.ingress[*].ip}' ⏎
# example out
134.209.142.6%
View CSI Driver
# Stock DO K8s cluster:
❯ kub get pods -A ✹
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system cilium-8s42h 1/1 Running 0 16m
kube-system cilium-d2gtl 1/1 Running 0 15m
kube-system cilium-operator-6444788657-npv4w 1/1 Running 0 18m
kube-system coredns-84c79f5fb4-7dgl7 1/1 Running 0 18m
kube-system coredns-84c79f5fb4-s9rwp 1/1 Running 0 18m
kube-system csi-do-node-6tqrc 2/2 Running 0 16m
kube-system csi-do-node-k2whm 2/2 Running 0 15m
View Felix Getting Started
brew install go
export PATH="$PATH:$HOME/go/bin"
cd felix?
felix version
felix fixit
make run
brew install protobuf
brew install grpcurl
go get -u github.com/golang/protobuf/protoc-gen-go
View openfaas no password
##################################
I am testing OpenFaaS 1-click with the following URL:
https://cloud.digitalocean.com/kubernetes/clusters/new?i=0999ca&nodePools=s-1vcpu-2gb:3&region=sfo2&addonslug=openfaas
I am able to get a gateway IP, but the password keeps coming back blank
Following instructions at https://github.com/openfaas-incubator/install-doks#log-into-openfaas
##################################
# everything looks to be in a "Running" state:
@arosales
arosales / gist:e37c542c12e43af4457bf7ec579f0736
Created May 31, 2018
Unattended Ubuntu 16.04 pkg update and install
View gist:e37c542c12e43af4457bf7ec579f0736
#!/bin/bash
echo "updating and installing apache"
sudo apt update
sudo apt -y upgrade
sudo apt install -y apache2
sudo chown -R `whoami`:`id -gn` /var/www/html
sudo apt install -y git
echo "making proj"
View gist:918728b635a806a872426fe24043d7a8
# Objective: build a Go gRPC service with proper unit testing. Below are a few links I would like to capture for sharing and continued research
https://medium.com/@matryer/5-simple-tips-and-tricks-for-writing-unit-tests-in-golang-619653f90742
https://toolbox.kurio.co.id/implementing-grpc-service-in-golang-afb9e05c0064
https://tech.palatinategroup.com/testing-a-golang-grpc-api-with-rspec-c4036ad2aeb7 # <--- Interesting from a Rails perspective
https://github.com/grpc/grpc-go/blob/master/examples/helloworld/greeter_client/main.go
https://github.com/grpc/grpc-go/blob/master/examples/helloworld/greeter_server/main.go
https://stackoverflow.com/questions/42102496/testing-a-grpc-service
https://github.com/grpc/grpc/blob/master/doc/unit_testing.md
https://github.com/grpc/grpc-go/blob/master/Documentation/gomock-example.md
https://blog.alexellis.io/golang-writing-unit-tests/
View step-04_run-terasort.yaml
title: Terasort Benchmark
description: |
Runs teragen to generate sample data, and then runs terasort to sort that data.
viewable: True
View step-04_run-terasort.sh
#!/bin/bash
# Path to executing script
#SCRIPT=$(realpath $0)
# Directory housing script
#SCRIPTPATH=$(dirname $SCRIPT)
#. $SCRIPTPATH/common.sh
You can’t perform that action at this time.