Skip to content

Commit

Permalink
[COST-4981] reset local unleash (#5148)
Browse files Browse the repository at this point in the history
  • Loading branch information
maskarb authored Jul 11, 2024
1 parent cd7ddb9 commit 1aff116
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 258 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ DEVELOPMENT=True

PROMETHEUS_MULTIPROC_DIR='/tmp'
CURRENCY_URL=https://open.er-api.com/v6/latest/USD
UNLEASH_TOKEN='*:*.dbffffc83b1f92eeaf133a7eb878d4c58231acc159b5e1478ce53cfc'
UNLEASH_ADMIN_TOKEN='*:*.dbffffc83b1f92eeaf133a7eb878d4c58231acc159b5e1478ce53cfc'
UNLEASH_TOKEN='*:development.dbffffc83b1f92eeaf133a7eb878d4c58231acc159b5e1478ce53cfc'
UNLEASH_PAT='user:6188b62f2f59348f3c195b66983147111682f4bb78a3f7ed9626bd84'
POLLING_TIMER=60 # Set how often you can trigger downloads per provider
PROCESSING_WAIT_TIMER=3 # Set how many days before a long processing provider can be polled again
LARGE_PROCESSING_WAIT_TIMER=7 # Set how many days before a long LARGE customer processing provider can be polled again
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ dev/*.yml

# unleash cache
.unleash/cache/
dev/containers/unleash/cache/

# performance profiling
/koku.iml
Expand Down
225 changes: 0 additions & 225 deletions .unleash/flags.json

This file was deleted.

22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ help:
@echo " superuser create a Django super user"
@echo " unittest run unittests"
@echo " local-upload-data upload data to Ingress if it is up and running locally"
@echo " unleash-export export feature-flags to file"
@echo " unleash-import import feature-flags from file"
@echo " unleash-import-drop import feature-flags from file AND wipe current database"
@echo " scan_project run security scan"
@echo ""
@echo "--- Commands using Docker Compose ---"
Expand Down Expand Up @@ -256,19 +253,6 @@ unittest:
superuser:
$(DJANGO_MANAGE) createsuperuser

unleash-export:
curl -X GET -H "Authorization: Basic YWRtaW46" \
"http://localhost:4242/api/admin/state/export?format=json&featureToggles=1&strategies=0&tags=0&projects=0&download=1" \
-s | python -m json.tool > .unleash/flags.json

unleash-import:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46" \
-s -d @.unleash/flags.json http://localhost:4242/api/admin/state/import

unleash-import-drop:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46" \
-s -d @.unleash/flags.json http://localhost:4242/api/admin/state/import?drop=true

clowdapp: kustomize
$(KUSTOMIZE) build deploy/kustomize > deploy/clowdapp.yaml

Expand Down Expand Up @@ -372,12 +356,8 @@ docker-up-min-no-build-with-listener: docker-up-min-no-build

docker-up-db:
$(DOCKER_COMPOSE) up -d db
@until pg_isready -h $${POSTGRES_SQL_SERVICE_HOST:-localhost} -p $${POSTGRES_SQL_SERVICE_PORT:-15432} >/dev/null ; do \
printf '.'; \
sleep 0.5 ; \
done
@echo ' PostgreSQL is available!'
$(DOCKER_COMPOSE) up -d unleash
dev/scripts/setup_unleash.py

docker-up-db-monitor:
$(DOCKER_COMPOSE) up --build -d grafana
Expand Down
4 changes: 4 additions & 0 deletions dev/containers/unleash/flags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": 1,
"features": []
}
Loading

0 comments on commit 1aff116

Please sign in to comment.