Skip to content

Instantly share code, notes, and snippets.

View ArangoGutierrez's full-sized avatar
Coffee engineer

Carlos Eduardo Arango Gutierrez ArangoGutierrez

Coffee engineer
View GitHub Profile
## OpenShift4 pull-secret:
1. Download your pull-secret from [console.redhat.com](https://console.redhat.com/openshift/install/aws/installer-provisioned)
- click on “Download Pull Secret”. Save it somewhere, e.g. ~/some-dir/pull-secret
2. Add the apps.ci auth to pull-secret! _internal OpenShift developers only_
- Obtain an API token by visiting https://oauth-openshift.apps.ci.l2s4.p1.openshiftapps.com/oauth/token/request
copy the oc login cmd and paste in terminal to login to the ci cluster, then run this:
- `$ oc registry login --to ~/some-dir/pull-secret`
This will append the auth from registry.ci.openshift.org to your cloud.openshift.com pull-secret but it will also
make the pull-secret multi-line.
@ArangoGutierrez
ArangoGutierrez / gpu-burst.sh
Last active July 28, 2020 21:52
Automaticaly create a GPU machine on a OpenShift AWS Cluster
#!/bin/bash
set -o nounset
set -o errexit
set -o pipefail
if test ! -f "${KUBECONFIG}"
then
echo "No kubeconfig, can not continue."
exit 0
@sjug
sjug / create_entitlement.sh
Created February 18, 2020 16:26
Shell script to create machineconfig entitlements
#!/bin/bash
sed "s/BASE64_RHSM_CONF_FILE/$(base64 -w 0 rhsm.conf)/" 0000-cluster-wide-machineconfigs.yaml.template > 0000-cluster-wide-machineconfigs.yaml
CERTS=$(find . -maxdepth 1 -name "*.pem" ! -name "*-key.pem")
VALID_CERTS=
ED_FILE=ed_replace
for c in ${CERTS}; do
CERT_KEY=${c%.pem}-key.pem
@harlow
harlow / worker-pool.go
Last active July 15, 2024 07:55
Worker pool to control concurrency and collect results
package main
import (
"fmt"
"sync"
"time"
)
const concurrency = 3
@ebraminio
ebraminio / upload.go
Last active March 22, 2023 06:01
golang upload client and server
// curl -X POST -H "Content-Type: application/octet-stream" --data-binary '@filename' http://127.0.0.1:5050/upload
package main
import (
"fmt"
"io"
"net/http"
"os"
"time"
@harlow
harlow / golang_job_queue.md
Last active July 12, 2024 03:19
Job queues in Golang