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

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

Open
25 of 42 tasks
php-coder opened this issue Aug 10, 2023 · 0 comments
Open
25 of 42 tasks

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

php-coder opened this issue Aug 10, 2023 · 0 comments
Assignees
Labels
ADR/needed A decision has been made and it needs to be documented area/infrastructure
Milestone

Comments

@php-coder
Copy link
Owner

php-coder commented Aug 10, 2023

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:

  • it should be possible to create VMs with Terraform

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

@php-coder php-coder added area/infrastructure ADR/needed A decision has been made and it needs to be documented labels Aug 10, 2023
@php-coder php-coder added this to the 0.4.8 milestone Aug 10, 2023
@php-coder php-coder self-assigned this Aug 10, 2023
php-coder added a commit that referenced this issue Aug 10, 2023
php-coder added a commit that referenced this issue Aug 11, 2023
php-coder added a commit that referenced this issue Aug 11, 2023
php-coder added a commit that referenced this issue Aug 11, 2023
php-coder added a commit that referenced this issue Aug 11, 2023
php-coder added a commit that referenced this issue Aug 11, 2023
php-coder added a commit that referenced this issue Aug 11, 2023
php-coder added a commit that referenced this issue Aug 13, 2023
php-coder added a commit that referenced this issue Aug 13, 2023
php-coder added a commit that referenced this issue Aug 13, 2023
php-coder added a commit that referenced this issue Aug 18, 2023
php-coder added a commit that referenced this issue Aug 23, 2023
$ cd src/main/frontend
$ npm install @action-validator/core @action-validator/cli --save-dev
$ npx action-validator ~/git/mystamps/.github/workflows/provision-by-terraform.yml
{
  "actionType": "workflow",
  "errors": [
    {
      "code": "parse_error",
      "detail": "could not find expected ':' at line 87 column 7, while scanning a simple key at line 76 column 9",
      "path": "",
      "title": "Parse Error",
      "location": {
        "index": 3416,
        "line": 87,
        "column": 7
      }
    }
  ]
}

Correction for e59534e commit

Part of #1631

[skip ci]
php-coder added a commit that referenced this issue Aug 23, 2023
php-coder added a commit that referenced this issue Aug 23, 2023
Correction for e59534e commit

Part of #1631

[skip ci]
php-coder added a commit that referenced this issue Oct 13, 2023
php-coder added a commit that referenced this issue Oct 15, 2023
php-coder added a commit that referenced this issue Oct 15, 2023
php-coder added a commit that referenced this issue Oct 15, 2023
php-coder added a commit that referenced this issue Oct 15, 2023
php-coder added a commit that referenced this issue Oct 17, 2023
php-coder added a commit that referenced this issue Oct 17, 2023
php-coder added a commit that referenced this issue Oct 24, 2023
This change reduces differences between prod.inventory and mystamps.inventory to let us merge them
later.

Part of #1631

[skip ci]
php-coder added a commit that referenced this issue Oct 24, 2023
@php-coder php-coder removed this from the 0.4.8 milestone Dec 29, 2023
@php-coder php-coder added this to the 0.4.9 milestone Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADR/needed A decision has been made and it needs to be documented area/infrastructure
Projects
None yet
Development

No branches or pull requests

1 participant