Skip to content

Commit

Permalink
feat:PR-43 Minor changes to test CircleCi pipeline (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipv1337 committed Oct 9, 2023
1 parent bcd0c87 commit 50d9c11
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 18 deletions.
84 changes: 66 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,14 @@ debug_jar_hello_springboot_app_run: bazel_build_hello_springboot_app
docker_clean:
./tools/scripts/make_docker_cleanup.sh

docker_run_amd64_debug:
# docker run -ti --rm --platform linux/amd64 alpine /bin/sh
docker run -ti --rm --platform linux/amd64 alpine uname -a

docker_run_arm64_debug:
# docker run -ti --rm --platform linux/arm64 alpine /bin/sh
docker run -ti --rm --platform linux/arm64 alpine uname -a

docker_load_example2_java_app: build_example2_java_app
docker load --input $$(bazel cquery --output=files //projects/java/example2_java_app:tarball)

Expand All @@ -562,20 +570,15 @@ docker_run_hello_springboot_app: docker_load_hello_springboot_app



minikube_start: minikube_eval
minikube start --mount --mount-string "${HOME}:${HOME}"
kubectl_get_all:
# kubectl get all --all-namespaces | column -t
kubectl get all --all-namespaces

minikube_eval:
#[!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! NOTICE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!]
# Run this command in your SHELL: eval $$(minikube -p minikube docker-env)
#[!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! NOTICE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!]
kubectl_get_pods_all:
kubectl get pods --all-namespaces

minikube_images:
minikube image ls --format='table'

# See: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
minikube_ingress:
minikube addons enable ingress
kubectl_run_shell:
kubectl run -ti --rm debug --restart=Never --image alpine /bin/sh



Expand All @@ -600,6 +603,10 @@ watch_ps_docker:
# ENVIRONMENT SECTION
#

#
# Local Development (Laptop - amd64/arm64)
#

# Install tooling for quickstart
# NOTE: Not needed if using Cloud Workstations
env_setup:
Expand All @@ -610,33 +617,74 @@ env_setup_copier:
pipx install copier

env_setup_bazel:
echo "Lets build something!"
# Lets build something!
# brew install bazelisk

env_setup_skaffold:
echo "Continuous Development!"
# Let's develop something!
# brew install skaffold



colima_start:
colima start

colima_setup:
# See: https://github.com/abiosoft/colima
colima || brew install colima
colima start --cpu 8 --memory 8 --disk 100 --vm-type vz --runtime docker --kubernetes --activate --network-address

colima_status:
colima status --extended

colima_list:
colima list



#
# Cloud Workstations Development (GCP - amd64)
#

minikube_start:
minikube start --mount --mount-string "${HOME}:${HOME}"

minikube_status:
minikube status

minikube_images:
minikube image ls --format='table'

# See: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
minikube_ingress:
minikube addons enable ingress



#
# REPO SECTION
#

# Analysis
repo_stats:
repo_view_stats:
docker run --rm -v "$(PWD):/tmp" aldanial/cloc .

repo_view_tree:
tree --dirsfirst -F -A .

repo_view_build_tree:
repo_view_tree_build:
tree --dirsfirst -F -A -P 'BUILD*' .

repo_view_tree_skaffold:
tree --dirsfirst -F -A -P 'skaffold.yaml' .



git_new:
git_new_master:
git fetch --all
git checkout -b master origin/master

git_push: test
git_push_branch_head: test
git push origin `git rev-parse --abbrev-ref HEAD`

git_log_oneline:
Expand Down
Empty file.
45 changes: 45 additions & 0 deletions docs/user_guides/Development_Environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Overview

There are various permutations to local development environments. Here we show the various approaches that has been tested, but we will also recommend the gold path that will satisfy both development experience and Open Container Initiative ([OCI](https://opencontainers.org/)) standards.

Although Docker created the container movement, they offer a specific implementation of container solutions with commericial implications such as Docker Desktop and their own implementation of containers that are not deployed by default from public cloud providers. OCI standards decouple container solutions from Docker the company and ensures we do not encounter any licensing conflicts.

Our goal is to develop in an environment exactly how we operate software in the public cloud, but also avoid vendor lockin to Docker, Inc.

## Development Workspace

Our golden path accounts for developers:

1. wanting to do local develpoment from their M1/Intel laptops (allows for offline development)
1. wanting to do remote development from Google Cloud Workstations using local IDE (supports local VSCode/IntelliJ/PyCharm with remote workstation access)
1. wanting to do remote development from Google Cloud Workstations (supports web based VSCode similar to Gitpod, Codespaces, etc)

We will support both development approaches eventhough managed workstations provide the best consistency and lowest friction to start day 1 development tasks. Priority support will be for our managed workstations and best level of effort applied to offline development.

NOTE: Production workloads are deployed on amd64 target.

### Offline Development (Laptops - amd64/arm64)

| Kubernetes Support | Easy to setup | Easy to use | Production Compliant with amd64 |
|:------------------:|:-------------:|:-----------:|:-------------------------------:|
| Colima | πŸ‘ | πŸ‘ | πŸ‘ |
| Docker Desktop | πŸ‘ | πŸ‘ | πŸ‘|
| Rancher Desktop | ☝️ | πŸ‘ | ☝️ |
| Podman Desktop | ☝️ | ☝️ | ☝️ |
| Minikube | ☝️ | πŸ‘ | ☝️ |

NOTE:
1. Colima simply works with no tinkering!
1. Although kubernetes will work with Docker Desktop, it is not production compliant!
1. Although kubernetes will work with Rancher Desktop, running amd64 images does not work without some hacking.
1. Although kubernetes will work with Podman Desktop, running container images only supports Kind.
1. Although kubernetes will work with Minikube, running amd64 images does not work without some hacking.

### Online Development (Cloud Workstations - amd64)

| Kubernetes Support | Easy to setup | Easy to use | Production Compliant with amd64 |
|:------------------:|:-------------:|:-----------:|:-------------------------------:|
| Minikube | πŸ‘ | πŸ‘ | πŸ‘ |

NOTE:
1. No setup required!
Empty file.

0 comments on commit 50d9c11

Please sign in to comment.