Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Metabase using ansible scripts and Docker containers #1427

Closed
vinayvenu opened this issue Nov 7, 2023 · 4 comments
Closed

Setup Metabase using ansible scripts and Docker containers #1427

vinayvenu opened this issue Nov 7, 2023 · 4 comments
Assignees

Comments

@vinayvenu
Copy link
Member

vinayvenu commented Nov 7, 2023

Action items

Setup Metabase using ansible scripts and Docker containers

Reference documentation

https://www.digitalocean.com/community/tutorials/how-to-use-ansible-to-install-and-set-up-docker-on-ubuntu-20-04

https://docs.ansible.com/ansible/latest/collections/community/docker/docker_container_module.html#ansible-collections-community-docker-docker-container-module-parameter-detach

https://www.hostinger.in/tutorials/docker-cheat-sheet#Container_Interaction_Commands


Metabase

  • Capture AMI of reporting server ec2 before upgrade
  • old version => v0.42.3, targeted version => docker pull metabase/metabase:v0.47.6

Approaches discussed

Upgrade metabase jar on Amazon Linux1 instance

=> Doesn't work as metabase:v0.47.6 needs Java11, which doesnt install on Amazon Linux1 instance

Setup new ec2 instance with Metabase running as Docker container within it (Choosen option)

=> setup docker, metabase using ansible
Logs? what to do? // Needs to be purged periodically
Volumes? //Can be ignored, everything is persisted in DB
EC2 instance Management, ALB? // Continue in old manner

Elastic Container Service

  • cluster (Reporting)
  • task
  • service (24/7 Healthcheck run always)
  • ALB
  • allocate a ec2 instance (Ec2-image-template)
  • Network config
  • Security group
  • CloudWatchLogs (Logs)
    => Too much of departure from current way of working

@github-project-automation github-project-automation bot moved this to New Issues in Avni Product Nov 7, 2023
@vinayvenu vinayvenu moved this from New Issues to Ready in Avni Product Nov 7, 2023
@himeshr himeshr self-assigned this Nov 7, 2023
@himeshr himeshr moved this from Ready to In Progress in Avni Product Nov 7, 2023
@himeshr
Copy link

himeshr commented Nov 7, 2023

Created ECS CLuster "reporting" with a task "metabase" to run metabase as a containerized service.

@himeshr
Copy link

himeshr commented Nov 8, 2023

Using this image, as the ec2 instance is arm64/v8 instanceType.

metabase/metabase#13119 (comment)

himeshr added a commit to avniproject/avni-infra that referenced this issue Nov 8, 2023
@himeshr
Copy link

himeshr commented Nov 8, 2023

Deploy tasks: (Pending)

  • Terminate reporting-db-temp
  • terminate t4g reporting-metabase server
  • Modify ec2 instance template to use t3 instance instead of t4g(arm64/v8)
  • Launch new ec2 instance
  • Update route53 mapping to point to new instance
  • Update secret to point to reporting-db old rds url
  • Run ansible playbook on reporting-metabase using below command
  • Run below specified make command to
    • Update ec2 instance env property to point to reporting-db old rds url
    • Restart docker container after rds url change
  • Route Reporting ALB traffic to new ec2 instance
  • Terminate old prod reporting instance
  • Correct reporting-ssh security-group to remove 3000 port
make metabase-onpremise VAULT_PASSWORD_FILE=~/.ssh/infra-valut-pwd-file

@himeshr himeshr moved this from In Progress to Code Review Ready in Avni Product Nov 8, 2023
@himeshr himeshr changed the title Upgrade Metabase Setup Metabase using ansible scripts and Docker containers Nov 8, 2023
@himeshr
Copy link

himeshr commented Nov 8, 2023

Test instance available at http://13.232.181.189:3000/auth/login?redirect=%2F

@1t5j0y 1t5j0y moved this from Code Review Ready to In Code Review in Avni Product Nov 9, 2023
@1t5j0y 1t5j0y moved this from In Code Review to Code Review with Comments in Avni Product Nov 9, 2023
himeshr added a commit to avniproject/avni-infra that referenced this issue Nov 9, 2023
@himeshr himeshr moved this from Code Review with Comments to QA Ready in Avni Product Nov 9, 2023
@himeshr himeshr moved this from QA Ready to In QA in Avni Product Nov 9, 2023
himeshr added a commit to avniproject/avni-infra that referenced this issue Nov 9, 2023
himeshr added a commit to avniproject/avni-infra that referenced this issue Nov 9, 2023
himeshr added a commit to avniproject/avni-infra that referenced this issue Nov 9, 2023
@AchalaBelokar AchalaBelokar moved this from In QA to QA Ready in Avni Product Nov 10, 2023
@himeshr himeshr moved this from QA Ready to Done in Avni Product Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants