Skip to content

Commit

Permalink
Iterating
Browse files Browse the repository at this point in the history
  • Loading branch information
chosak committed Jan 7, 2025
1 parent 7503f75 commit fa887fc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ cfgov/regulations3k/jinja2/regulations3k/workbox-*.js
cfgov/regulations3k/jinja2/regulations3k/workbox-*.js.map

# Helm Charts #
helm/apache/
helm/charts/

# Apache #
Expand All @@ -157,5 +158,5 @@ cfgov/apache/modules
##############################
docker-compose.pgadmin.yml

# Helm #
helm/charts/
# Helm #
helm/charts/
17 changes: 10 additions & 7 deletions helm-init.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Fail if any command fails.
set -e

# Define color codes for pretty output
RED='\033[0;31m'
GREEN='\033[0;32m'
Expand All @@ -20,13 +23,13 @@ if ! command -v kubectl &> /dev/null; then
exit 1
fi

if ! docker images | grep -q "cfgov"; then
echo -e "${RED}Docker images 'cfgov' could not be found."
docker build . -t cfgov
if ! docker images -q --filter=reference='cfgov' | grep -q .; then
echo -e "${RED}Docker image 'cfgov' could not be found."
docker build . -t cfgo
fi

if ! docker images | grep -q "cfgov-apache"; then
echo -e "${RED}Docker images 'cfgov-apache' could not be found."
if ! docker images -q --filter=reference='cfgov-apache' | grep -q .; then
echo -e "${RED}Docker image 'cfgov-apache' could not be found."
docker build ./cfgov/apache/. -t cfgov-apache
fi

Expand Down Expand Up @@ -76,7 +79,7 @@ else
echo -e "${GREEN}Updating Helm dependencies...${NC}"
helm dependency update $HELM_DIR
fi
fi
fi

# Upgrade or install the Helm release
echo -e "${GREEN}Upgrading/Installing Helm release...${NC}"
Expand All @@ -89,4 +92,4 @@ rm -r $HELM_DIR/apache
echo -e "${GREEN}Helm initialization script completed successfully.${NC}"

cat $OUTPUT_FILE
rm $OUTPUT_FILE
rm $OUTPUT_FILE
5 changes: 4 additions & 1 deletion helm-uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Fail if any command fails.
set -e

# Define color codes for pretty output
RED='\033[0;31m'
GREEN='\033[0;32m'
Expand Down Expand Up @@ -35,4 +38,4 @@ fi
# echo -e "${GREEN}Deleting namespace ${NAMESPACE}...${NC}"
# kubectl delete namespace $NAMESPACE

echo -e "${GREEN}Helm uninstallation script completed successfully.${NC}"
echo -e "${GREEN}Helm uninstallation script completed successfully.${NC}"
4 changes: 2 additions & 2 deletions helm/notes/NOTES-local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ OpenSearch:

cfgov:
- Service Name: cfgov
- Applicaiton Port: 8000
- Application Port: 8000
- Apache Port: 80

To access cfgov, run the following commands:
export CFGOV_POD=$(kubectl get pods -l "app.kubernetes.io/name=cfgov" -o jsonpath="{.items[0].metadata.name}")
export CFGOV_PORT=$(kubectl get pod $CFGOV_POD -o jsonpath="{.spec.containers[1].ports[0].containerPort}")
echo "cfgov is running on internal port $CFGOV_PORT"
kubectl port-forward $CFGOV_POD 8080:$CFGOV_PORT
Visit cfgov at: http://127.0.0.1:8080
Visit cfgov at: http://127.0.0.1:8080

0 comments on commit fa887fc

Please sign in to comment.