-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from NASA-IMPACT/fix/install-dependencies
Fix installing the deployment dependencies
- Loading branch information
Showing
4 changed files
with
49 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
SECRET_NAME="" | ||
ENV_FILE=".env" | ||
|
||
|
||
important_message = \ | ||
@echo "\033[0;31m$(1) \033[0m" | ||
|
||
info_message = \ | ||
@echo "\033[0;32m$(1) \033[0m" | ||
|
||
|
||
count_down = \ | ||
@echo "Spinning up the system please wait..."; \ | ||
secs=40 ;\ | ||
|
@@ -18,16 +16,13 @@ count_down = \ | |
: $$((secs--)); \ | ||
done; | ||
|
||
|
||
.PHONY: | ||
clean | ||
all | ||
|
||
|
||
list | ||
|
||
all: sm2a-local-init sm2a-local-run | ||
|
||
|
||
sm2a-local-run: sm2a-local-stop | ||
@echo "Running SM2A" | ||
docker compose up -d | ||
|
@@ -39,16 +34,22 @@ sm2a-local-run: sm2a-local-stop | |
|
||
sm2a-local-init: | ||
cp sm2a-local-config/env_example sm2a-local-config/.env | ||
cp -r ../dags . | ||
docker compose run --rm airflow-cli db init | ||
docker compose run --rm airflow-cli users create --email [email protected] --firstname airflow --lastname airflow --password airflow --username airflow --role Admin | ||
rm -rf dags | ||
|
||
sm2a-local-stop: | ||
docker compose down | ||
|
||
sm2a-local-build: | ||
cp -r ../dags . | ||
docker compose build | ||
rm -rf dags | ||
|
||
sm2a-deploy: | ||
@echo "Installing the deployment dependency" | ||
pip install -r deploy_requirements.txt | ||
pip install -r ../deploy_requirements.txt | ||
@echo "Deploying SM2A" | ||
cp -r ../dags . | ||
python scripts/generate_env_file.py --secret-id ${SECRET_NAME} --env-file ${ENV_FILE} | ||
|
@@ -60,3 +61,6 @@ clean: sm2a-local-stop | |
docker container prune -f | ||
docker image prune -f | ||
docker volume prune -f | ||
|
||
list: | ||
@grep '^[^#[:space:]].*:' Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters