Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
willyguggenheim committed Jan 15, 2022
1 parent d205098 commit d28948c
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 40 deletions.
41 changes: 34 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,51 @@ Mac, Linux, Windows or any Docker and AWS.
Just Docker (no admin rights required) !!


# Setup Your AWS Cloud
# Start Cloud

1) Create kms key alias named like kubify_secrets_[env]
1) Create kms key(s) alias named like kubify_secrets_[env] (for each env)

2) `./kubify deploy_cloud dev`


# Stop Cloud

`./kubify delete_clouds_testing`

# Summary, Install/Reset Workstation

# Start Debugging

A) To install/run on your OS directly: `./kubify up`
A) To install/run on your OS directly (brew): `./kubify up`

or

B) To install/run in a container: `./kubify up_container`

B) To install/run in a container (no admin rights): `./kubify up_container`


# 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)
```


# 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!!

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
💻💻💻💻💻💻💻💻💻💻💻💻
Expand Down
2 changes: 2 additions & 0 deletions dev/svc/example-java-svc/kubify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions dev/svc/example-node-complex-svc/kubify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
Expand Down
2 changes: 1 addition & 1 deletion dev/svc/zookeeper-svc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"version": "0.0.1",
"description": "Simulate AWS Services Locally",
"dependencies": {
"express": "^4.17.1"
"express": "^4.17.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down
45 changes: 14 additions & 31 deletions src/kubify/tool/kubify
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]" &> /dev/null
git config --global user.email "${GIT_EMAIL}" &> /dev/null || git config --global user.email "[email protected]" &> /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 "[email protected]"

if [[ -z "${AWS_SECRET_ACCESS_KEY}" ]]; then
if [ ! -f ${HOME}/.aws/credentials ]; then
Expand Down Expand Up @@ -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"

}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d28948c

Please sign in to comment.