Skip to content

Commit

Permalink
Making @echo consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
amarouane-ABDELHAK committed Aug 27, 2024
1 parent 0301e6d commit 23435b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions sm2a/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,29 @@ count_down = \
all: sm2a-local-init sm2a-local-run


sm2a-local-run: sm2a-local-stop sm2a-cp-dags
sm2a-local-run: sm2a-local-stop
@echo "Running SM2A"
docker compose up -d
$(call important_message, "Give the resources a minute to be healthy 💪")
$(count_down)
$(call info_message, "Please visit http://localhost:8080")
echo "username:airflow | password:airflow"
echo "To use local SM2A with AWS update ${SM2A_FOLDER}/sm2a-local-config/.env AWS credentials"
@echo "username:airflow | password:airflow"
@echo "To use local SM2A with AWS update ${SM2A_FOLDER}/sm2a-local-config/.env AWS credentials"

sm2a-local-init: sm2a-cp-dags
sm2a-local-init:
cp sm2a-local-config/env_example sm2a-local-config/.env
docker compose run --rm airflow-cli db init
docker compose run --rm airflow-cli users create --email airflow@example.com --firstname airflow --lastname airflow --password airflow --username airflow --role Admin

sm2a-local-stop:
docker compose down

sm2a-cp-dags:
cp -r ../dags .

sm2a-deploy: sm2a-cp-dags
sm2a-deploy:
@echo "Installing the deployment dependency"
pip install -r deploy_requirements.txt
echo "Deploying SM2A"
@echo "Deploying SM2A"
cp -r ../dags .
python scripts/generate_env_file.py --secret-id ${SECRET_NAME} --env-file ${ENV_FILE}
./scripts/deploy.sh ${ENV_FILE} <<< init
./scripts/deploy.sh ${ENV_FILE} <<< deploy
Expand Down
4 changes: 2 additions & 2 deletions sm2a/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ x-airflow-common:
# Gotcha: Even though we set this to "True" in airflow.cfg, an environment variable overrides it
AIRFLOW__CORE__LOAD_EXAMPLES: false
volumes:
- ./dags:/opt/airflow/dags
- ../dags:/opt/airflow/dags
- ./plugins:/opt/airflow/plugins
- ./sm2a-local-config/local_airflow.cfg:/opt/airflow/airflow.cfg
- ./sm2a-local-config/local_webserver_config.py:/opt/airflow/webserver_config.py
Expand All @@ -47,7 +47,7 @@ x-airflow-worker:
environment:
<<: *airflow-common-env
volumes:
- ./dags:/opt/airflow/dags
- ../dags:/opt/airflow/dags
- ./plugins:/opt/airflow/plugins
- ./sm2a-local-config/local_airflow.cfg:/opt/airflow/airflow.cfg
- ./infrastructure/configuration:/opt/airflow/configuration
Expand Down

0 comments on commit 23435b5

Please sign in to comment.