Skip to content

Commit

Permalink
docs(deploy): fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Jun 14, 2020
1 parent 3b257bb commit 8c18aeb
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: "Deploy to KinD and E2E"
runs-on: ubuntu-latest
steps:
- name: Download deploy.e2e.yaml from Release
- name: Download kubernetes.local.yaml from Release
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
DOWNLOAD_URL: ${{ github.event.release.assets[0].browser_download_url }}
Expand All @@ -21,7 +21,7 @@ jobs:
uses: engineerd/setup-kind@v0.1.0
# with:
# config: .github/kubernetes/kind.yaml
- name: "Deploy deploy.e2e.yaml to KinD"
- name: "Deploy kubernetes.local.yaml to KinD"
id: local-path
run: |
export KUBECONFIG="$(kind get kubeconfig-path)"
Expand All @@ -32,7 +32,7 @@ jobs:
echo "cluster-info ..."
kubectl cluster-info
echo "installing e2e overlay..."
kubectl apply -f deploy.e2e.yaml
kubectl apply -f kubernetes.local.yaml
echo "waiting for pods to be ready ..."
kubectl wait --for=condition=Ready pods --all --timeout=5m
kubectl get pods
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/kind-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
runs-on: ubuntu-latest
if: github.event.deployment.environment == 'e2e'
steps:
- name: Download deploy.e2e.yaml from Release
- name: Download kubernetes.local.yaml from Release
env:
RELEASE_URL: ${{ github.event.repository.releases_url }}
run: |
echo "Downloading $RELEASE_URL"
# curl -O -L $RELEASE_URL
# FIXME Workaround
curl -s https://api.github.com/repos/xmlking/micro-starter-kit/releases/latest | grep browser_download_url | grep deploy.e2e.yaml | cut -d '"' -f 4 | wget -qi -
curl -s https://api.github.com/repos/xmlking/micro-starter-kit/releases/latest | grep browser_download_url | grep kubernetes.local.yaml | cut -d '"' -f 4 | wget -qi -
- name: "deployment pending"
uses: "deliverybot/deployment-status@master"
with:
Expand All @@ -32,7 +32,7 @@ jobs:
uses: engineerd/setup-kind@v0.1.0
# with:
# config: .github/kubernetes/kind.yaml
- name: "Deploy deploy.e2e.yaml to KinD"
- name: "Deploy kubernetes.local.yaml to KinD"
id: local-path
run: |
export KUBECONFIG="$(kind get kubeconfig-path)"
Expand All @@ -43,7 +43,7 @@ jobs:
echo "cluster-info ..."
kubectl cluster-info
echo "installing e2e overlay..."
kubectl apply -f deploy.e2e.yaml
kubectl apply -f kubernetes.local.yaml
echo "waiting for pods to be ready ..."
kubectl wait --for=condition=Ready pods --all --timeout=5m
kubectl get pods
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/deploy.e2e.yaml
asset_name: deploy.e2e.yaml
asset_path: ./build/kubernetes.local.yaml
asset_name: kubernetes.local.yaml
asset_content_type: text/vnd.yaml
docker:
name: Build and Publish docker images
Expand Down
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"zxh404.vscode-proto3",
"xaver.clang-format",
"EditorConfig.EditorConfig",
"donjayamanne.githistory",
"humao.rest-client",
"PKief.material-icon-theme",
"hediet.vscode-drawio",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ docker rmi $(docker images -f "dangling=true" -q)

# make kustomize OVERLAY=e2e NS=default VERSION=v0.1.0-440-g6c7fb7a
make kustomize
kubectl apply -f build/deploy.yaml
kubectl apply -f build/kubernetes.yaml

POD_NAME=$(kubectl get pods -lapp.kubernetes.io/name=account-srv -o jsonpath='{.items[0].metadata.name}')
kubectl logs -f -c srv $POD_NAME

kubectl delete -f build/deploy.yaml
kubectl delete -f build/kubernetes.yaml
```

## Reference
Expand Down
12 changes: 6 additions & 6 deletions config/README_old.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ deploy
│ ├── service-headless.yaml
│ ├── service.yaml
│ └── statefulset.yaml
├── deploy.e2e.yaml
├── deploy.production.yaml
├── deploy.yaml
├── kubernetes.local.yaml
├── kubernetes.production.yaml
├── kubernetes.yaml
└── overlays <-- environments
├── e2e
│ ├── kustomization.yaml
Expand Down Expand Up @@ -212,8 +212,8 @@ kustomize build config/envs/production --output ./build/kubernetes/production
# make kustomize NS=default OVERLAY=production VERSION=v0.1.3
# make kustomize NS=default OVERLAY=e2e VERSION=v0.1.3
make kustomize
kubeval --strict --ignore-missing-schemas build/deploy.yaml
kubectl apply -f build/deploy.yaml
kubeval --strict --ignore-missing-schemas build/kubernetes.yaml
kubectl apply -f build/kubernetes.yaml
kubectl get all -l app.kubernetes.io/managed-by=kustomize
open http://localhost:8500/ui/#/dc1/services

Expand All @@ -225,7 +225,7 @@ kubectl exec -it $POD_NAME -- busybox sh

kubectl get svc

kubectl delete -f build/deploy.yaml
kubectl delete -f build/kubernetes.yaml
```

## kustomize-sopssecret-plugin
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
image: envoyproxy/envoy:latest
command: /usr/local/bin/envoy -c etc/envoy/envoy.yaml
volumes:
- "./deploy/bases/envoy/envoy.yaml:/etc/envoy/envoy.yaml"
- "./config/base/envoy/envoy.yaml:/etc/envoy/envoy.yaml"
expose:
- "9090"
- "9901"
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/gitops.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- build docker images
- sign images
- push images to GCR
- generate build/deploy.yaml for k8s with Helm or Kustomize
- generate build/kubernetes.yaml for k8s with Helm or Kustomize
- generate release on GitHub

## Deployment Pipeline
Expand Down
4 changes: 2 additions & 2 deletions docs/introduction/makefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ make docker_clean

### kustomize

> generate `build/deploy.yaml` for given `overlay` and `namespace` using **kustomize**
> generate `build/kubernetes.yaml` for given `overlay` and `namespace` using **kustomize**
```bash
make kustomize OVERLAY=production NS=default VERSION=v1.0.1
Expand All @@ -160,7 +160,7 @@ make kustomize OVERLAY=production
make kustomize NS=default
# defaults: ENV=local, NS=default, VERSION=git tag
make kustomize
# build yaml files for e2e, prod overlays into ./build
# build yaml files for local, prod overlays into ./build
make build/kustomize VERSION=v0.2.5
```

Expand Down
8 changes: 4 additions & 4 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ True **e2e** tests are Black-box tests that invoke network endpoint.
```bash
# start
kubectl apply -f build/deploy.e2e.yaml
kubectl apply -f build/kubernetes.local.yaml
# stop
kubectl delete -f build/deploy.e2e.yaml
kubectl delete -f build/kubernetes.local.yaml
```

> (Or) start production like e2e test cluster locally
```bash
# start
kubectl apply -f build/deploy.production.yaml
kubectl apply -f build/kubernetes.production.yaml
# stop
kubectl delete -f build/deploy.production.yaml
kubectl delete -f build/kubernetes.production.yaml
```

## E2E Test via REST Gateway
Expand Down

0 comments on commit 8c18aeb

Please sign in to comment.