Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
feat: drop nginx and use kardinal gateway (#31)
Browse files Browse the repository at this point in the history
* drop nginx

* use gateway

* Update README.md

---------

Co-authored-by: Galen Marchetti <[email protected]>
  • Loading branch information
h4ck3rk3y and galenmarchetti authored Aug 6, 2024
1 parent 0eed611 commit b33cdd8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 259 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ Follow these steps to explore the Kardinal Playground.

2. 🛍️ Explore the main online boutique deployment:
```
./scripts/forward.sh
kardinal gateway prod
```
This script will forward the main demo application port from within Codespaces to a URL you can access
This command forwards the main demo application port from within Codespaces to a URL you can access

Now, explore the application:
- Use the URL provided by the forward.sh script
- Click the URL provided by gateway `http://localhost:9060`
- Browse through the online store and add items to your cart
- To see your application architecture, get your dashboard URL by running the following:
```
Expand All @@ -54,10 +54,10 @@ Follow these steps to explore the Kardinal Playground.
```
This command sets up a development version of the frontend alongside the main version. It will output a URL, but it's not yet accessible because it's inside the Codespace.
- To interact with the dev version, copy the hostname from the previous command (it should look like `dev-[a-zA-Z0-9]+.app.localhost`)
- To interact with the dev version, copy the flow-id from the previous command (it should look like `dev-[a-zA-Z0-9]`)
- Run the following to forward the dev demo application port from within Codespaces to a URL you can access
```
./scripts/forward.sh [your-dev-host-value]
kardinal gateway [flow-id]
```
- Access the dev frontend from the forwarded port
- Notice how two items are already in the cart, as the dev database is configured to be seeded with some dev data
Expand Down Expand Up @@ -85,11 +85,13 @@ This guide showcases the power of Kardinal by demonstrating the seamless creatio
## 🔗 Port Forwarding Explanation
We're using port forwarding in combination with nginx in this Codespace setup to make the various services accessible to you. We use Codespaces to forward URLs over the internet but add an nginx proxy to set the right hostname to hit the right lightweight environment
We're using port forwarding in combination with a proxy in this Codespace setup to make the various services accessible to you. We use Codespaces to forward URLs over the internet but add an nginx proxy to set the right hostname to hit the right lightweight environment
If you encounter any issues with port forwarding or nginx, you can reset it by running:
```
./scripts/forward.sh
# make sure all pods are running and 2/2
kubectl get pods -n prod
kardinal gateway [flow-id]
```
## 🐘 Neon PostgreSQL Demo
Expand Down
244 changes: 0 additions & 244 deletions scripts/forward.sh

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@ setup_kardinal_cli() {
log_verbose "Kardinal CLI setup completed. The 'kardinal' command is now available at $KARDINAL_CLI_PATH."
}

install_nginx() {
log "🌐 Installing nginx..."
run_command_with_spinner sudo apt-get update
run_command_with_spinner sudo apt-get install -y nginx
log_verbose "nginx installed successfully."
}

deploy_kardinal_manager() {
log "🚀 Deploying Kardinal Manager..."

Expand Down Expand Up @@ -182,7 +175,6 @@ main() {
start_minikube
install_istio
setup_kardinal_cli
install_nginx
deploy_kardinal_manager

log "✅ Startup completed! Minikube, Istio, Kontrol, and Kardinal Manager are ready."
Expand Down

0 comments on commit b33cdd8

Please sign in to comment.