Skip to content

Instantly share code, notes, and snippets.

@yanivpaz
Created April 15, 2020 10:09
Show Gist options
  • Save yanivpaz/c883a47291e7759f631f1d26f5aeeba3 to your computer and use it in GitHub Desktop.
Save yanivpaz/c883a47291e7759f631f1d26f5aeeba3 to your computer and use it in GitHub Desktop.
# Argo demo
## Kubectl
```
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
```
## install vscode and tools
```
sudo yum install libXScrnSaver.x86_64
sudo rpm -ivh ./code-1.41.1-1576681965.el7.x86_64.rpm
sudo yum install zsh
sudo chsh -s /bin/zsh `whoami`
sudo yum install wget git
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
```
## install argo
```
oc login -u kubeadmin -p mhk2X-Y8ozE-9icYb-uLCdV https://api.crc.testing:6443
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
VERSION=$(curl --silent "https://api.github.com/repos/argoproj/argo-cd/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/$VERSION/argocd-linux-amd64
argocd login localhost:8080 --name admin --password argocd-server-5d5994fff7-2rwl6
```
## Create argo cd flow
```
oc login -u developer -p developer https://api.crc.testing:6443
argocd app create guestbook \
--repo https://github.com/argoproj/argocd-example-apps.git \
--path guestbook \
--dest-server https://kubernetes.default.svc \
--dest-namespace default
kubectl port-forward svc/guestbook-ui -n default 8090:80
```
## install CRC
```
unxz crc-linux-amd64.tar.xz
tar xvf crc-linux-amd64.tar
curl -O https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.2/linux/oc.tar.gz
tar zxvf ./oc.tar.gz
sudo mv oc /usr/local/bin
sudo mv ./kubectl crc-linux-1.3.0-amd64/crc /usr/local/bin
oc login -u developer -p developer https://api.crc.testing:6443
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment