Skip to content

my-stamps.ru: migrate away from DigitalOcean #1631

Open
@php-coder

Description

@php-coder

Reasons to change the hosting:

  • I can't pay for it anymore as my card isn't accepted
  • The price got higher ($7.2/mo) and there should be a cheaper alternative

Requirements:

Plan:

  • automate the current provisioning with Terraform
  • automate the current provisioning with Ansible
    • Publish playbook for production #1125
    • Use ansible-vault for sensitive data #435
    • Ansible: automate prod server installation #267
    • run a playbook in --syntax-check mode
      • commit infra/vagrant/provisioning/prod.inventory
        • correct links
      • commit infra/vagrant/provisioning/vars/prod.yml
      • fix ansible-playbook: ERROR! the role 'php-coder.oraclejdk' was not found
      • fix ansible-galaxy: ERROR! Expecting requirements file to be a dict with the key 'collections' that contains a list of collections to install
    • run a playbook in --check mode (resolution: as we can't fully rely on check mode (because shell and command are always get executed), let's not use it)
    • run a real playbook
      • fix Failed to connect to the host via ssh: Host key verification failed (disable host key checking)
      • fix Failed to connect to the host via ssh: no such identity: /Users/coder/.ssh/mystamps_rsa: No such file or directory (commit mystamps_rsa)
      • fix Could not find or access '../../../target/mystamps.war (need to build WAR file)
  • provision with Terraform to a new server
  • provision with Ansible to a new server
  • add caching for tfenv/terraform/ansible/ansible roles
  • consider running ansible with --diff option (and set diff: no to the tasks with sensitive information) (resolution: we decided to not use check mode, so this option isn't needed either)
  • merge together 2 prod inventories (one for deploy and one for everything else) (Use mystamps-app Ansible role for deployment #431)
  • choose a way to run ansible: fully from a pipeline or from within a script (like deploy.sh). The latter has a benefit that it can be run locally, as well (easier to debug)

See also similar issue for the past migration: #399

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions