diff --git a/README.md b/README.md index 4c13e05..c2d8ab9 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,98 @@ ![TURN_KEY_DEVOPS_RAPID_TESTER](./docs/img/README_md_imgs/kubify-arch.drawio.png) -# Awesome !! - -Well hello there. Ready to Simulate AWS Cloud Locally?? +# Welcome -# By Why ? +Well hello there! Welcome to Kubify. The Turn-Key DevOps OS Stack. -Because Docker-Compose and Terraform are 2 different tools (so I fixed it). +The world needs a fully Open Source and FREE DevOps Stack. Devs Approved. -# Future State? +# Awesome !! -Fork Terraform and build Docker-Compose, LocalStack & 🛹 Skater Hot Reloader into it. +Code faster than your Competition. +Fully Automated. First Class DevEx. Developers-First. Happy Devs. Fixes Spot. No more K8s pains. -# What do I need? +You need your own environment, you need to test in real environment, you need to modify multiple services at the same time (without waiting for builds), you need to know your commit works before pushing it and you need the entire cloud on your laptop to do so.. -Mac, Linux, Windows or any Docker and AWS. +# By Why ? + +Because Docker-Compose and Terraform are 2 different tools (so I fixed it). + -# Dependencies For Runtime? +# Future State? + +Fork Terraform and build Docker-Compose, LocalStack & 🛹 Skater Hot Reloader into it. + +# What do I need? + +Mac, Linux, Windows or any Docker and AWS. + + +# Dependencies For Runtime? + Just Docker (no admin rights required) !! + + +# Start Cloud + +1) Create kms key(s) alias named like kubify_secrets_[env] (for each env) + +2) `./kubify deploy_cloud dev` + +# Stop Cloud -# Setup Your AWS Cloud +`./kubify delete_clouds_testing` + +# Start Debugging + +A) To install/run on your OS directly (brew): `./kubify up` + +or -`./kubify deploy_cloud dev` +B) To install/run in a container (no admin rights): `./kubify up_container` -# Summary, Install/Reset Workstation +# Rapid Test +``` +cd dev/svc/example-node-complex-svc +../../../kubify_verbose start +# open another terminal (because you need to work on another dependant service at the same time) +cd dev/svc/example-flask-svc +../../../kubify_verbose start +# make changes to both service's app folders (or any files/folders enabled in "sync" in kubify.yml) +``` -`./kubify up` or `./kubify up_container` +# Stop Debugging +`./kubify down` + + ![FUTUREOFDEVOPS9000](./docs/img/README_md_imgs/the-future.gif) +Your own REAL FULL environment (local & cloud). Entire AWS Cloud on Your Workstation!! -# Hashtags, More Hashtags - +Easy Cloud Env, Easy Patching, Easy Version Rollback and Quality Commits, FAST!! + +The Future, NOW. Developer's Dreams are Coming True Here.. +# Hashtags, More Hashtags 💻💻💻💻💻💻💻💻💻💻💻💻 - #AUTOPILOTFORDEVOPS - #STAYINSPIRATIONAL - #FREESOFTWARE - #THEFUTURE - #DEVLOVE - #DEVEX - 💻💻 + +🛹 + -🛹 \ No newline at end of file diff --git a/dev/svc/example-java-svc/kubify.yml b/dev/svc/example-java-svc/kubify.yml index c1911c4..9738965 100644 --- a/dev/svc/example-java-svc/kubify.yml +++ b/dev/svc/example-java-svc/kubify.yml @@ -5,6 +5,8 @@ metadata: name: example-java-svc init: | echo "run migrations for example-java-svc/app" +depends_on: + - zookeeper-svc dev: # "sync" is if you want Kubify to listen for code changes (other option is # using some cli listener for code changes in release.scripts.start) diff --git a/dev/svc/example-node-complex-svc/kubify.yml b/dev/svc/example-node-complex-svc/kubify.yml index 8037fa1..9785ec2 100644 --- a/dev/svc/example-node-complex-svc/kubify.yml +++ b/dev/svc/example-node-complex-svc/kubify.yml @@ -5,6 +5,8 @@ metadata: name: example-node-complex-svc init: | echo "run init for example-node-complex-svc/app" +depends_on: + - zookeeper-svc dev: sync: 'app/***': 'app/' diff --git a/dev/svc/zookeeper-svc/package.json b/dev/svc/zookeeper-svc/package.json index 00ceada..f353b0b 100644 --- a/dev/svc/zookeeper-svc/package.json +++ b/dev/svc/zookeeper-svc/package.json @@ -3,6 +3,6 @@ "version": "0.0.1", "description": "Simulate AWS Services Locally", "dependencies": { - "express": "^4.17.1" + "express": "^4.17.2" } } diff --git a/src/kubify/k8s/ansible/roles/generate_configs_from_kubify_yaml/tasks/main.yml b/src/kubify/k8s/ansible/roles/generate_configs_from_kubify_yaml/tasks/main.yml index 1da62d5..24c44b5 100644 --- a/src/kubify/k8s/ansible/roles/generate_configs_from_kubify_yaml/tasks/main.yml +++ b/src/kubify/k8s/ansible/roles/generate_configs_from_kubify_yaml/tasks/main.yml @@ -171,8 +171,9 @@ #use the new depends_on feature.. - name: Deploying Cloudformation templates with deployCloudformation.sh - shell: "{{ app_kubify_dir }}/deployCloudformation.sh" + shell: "{{ app_kubify_dir }}/deployCloudformation.sh 2>/dev/null" when: app_name is not search(".*localstack.*") + ignore_errors: true diff --git a/src/kubify/tool/kubify b/src/kubify/tool/kubify index f19b676..bd2a82f 100755 --- a/src/kubify/tool/kubify +++ b/src/kubify/tool/kubify @@ -241,35 +241,8 @@ else PROFILE=${KUBIFY_PROFILE:-default} fi -git config --get user.name &> /dev/null -if [ $? -eq 1 ]; then - echo "What is your first and last name (for git config)?" - read -t 10 GIT_FIRST_LAST - FIRST_LAST=${GIT_FIRST_LAST} - git config --set user.name "${GIT_FIRST_LAST}" &> /dev/null || git config --set user.name "Iwas NeverGivenAname" &> /dev/null - git config --global user.name "${GIT_FIRST_LAST}" &> /dev/null || git config --global user.name "Iwas NeverGivenAname" &> /dev/null -fi - -git config --get user.email &> /dev/null -if [ $? -eq 1 ]; then - echo "What is your email address (for git config)?" - read -t 10 GIT_EMAIL - EMAIL=${EMAIL} - git config --set user.email "${GIT_EMAIL}" &> /dev/null || git config --set user.email "awesome@sauce.whoknows" &> /dev/null - git config --global user.email "${GIT_EMAIL}" &> /dev/null || git config --global user.email "awesome@sauce.whoknows" &> /dev/null -fi - -if ! [ -x "$(command -v git config --get user.email)" ]; then - echo " - !!ERROR: - Please configure your git first: - Make sure git key exists, example: stat ~/.ssh/id_rsa - Make sure permissions, example: chmod 600 ~/.ssh/id_rsa - Make sure your git user.name is set, example: git config --global user.name '[First Last]' - Make sure your git user.name is set, example: git config --global user.email '[Email]' - " - exit 1 -fi +git config --get user.name | grep -E "[a-z]" || git config --global user.name "Set YourGitUsername" +git config --get user.email | grep -E "[a-z]" || git config --global user.email "Set@YourGitEmail.kubify.com" if [[ -z "${AWS_SECRET_ACCESS_KEY}" ]]; then if [ ! -f ${HOME}/.aws/credentials ]; then @@ -3148,8 +3121,8 @@ EOF docker-compose up -d docker ps | grep kubify-kubify-1 - docker exec -it --privileged -w "/src/kubify" "kubify-kubify-1" ./kubify_verbose _up_container - docker exec -it --privileged -w "/src/kubify/dev/svc/localstack-aws-svc" "kubify-kubify-1" ../../../kubify_verbose run + docker exec -it --privileged -w "/src/kubify" "kubify-kubify-1" ./kubify _up_container + docker exec -it --privileged -w "/src/kubify/dev/svc/localstack-aws-svc" "kubify-kubify-1" ../../../kubify run # docker exec -it --privileged -w "/src/kubify/dev/svc/localstack-aws-svc" "kubify-kubify-1" "../../../kubify run" } @@ -3294,6 +3267,16 @@ function deploy_cloud { } +function delete_clouds_testing { + + eksctl delete cluster --name "kubify-cpu-dev-west" --region us-west-2 & + eksctl delete cluster --name "kubify-gpu-dev-west" --region us-west-2 & + eksctl delete cluster --name "kubify-cpu-dev-east" --region us-east-1 & + eksctl delete cluster --name "kubify-gpu-dev-east" --region us-east-1 & + wait + +} + #### # END OF CONTAINER MOD