Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

[documentation] archive_instances management command missing documentation #684

Open
dylan-grafmyre opened this issue Jan 6, 2021 · 0 comments

Comments

@dylan-grafmyre
Copy link

as an ocim operator
I want all expected manual tasks to be recorded in documentation
so that operational knowledge is self-service, and not lost

  • document manual task: how to archive instance (host login, shell setup/screen attach, basic navigation, execution/interactive steps, verification, additional record keeping (spreadsheets or inventory systems to update?)

make manage 'archive_instances --domains=sandbox.example.com,test.example.com'
(opencraft) www-data@ocim:~/opencraft$ make manage -- archive_instances --file /tmp/bb-3333-archive-instances.txt

full quote from https://tasks.opencraft.com/browse/BB-3333 follows.

Archive Ocim instances [...]

To archive the instances you will need to connect to the Ocim server using ssh and use the Django shell to archive instances since there is currently no UI to do so.

  • Connect to Ocim using: [ssh command]
  • See a list of screens with screen -list.
  • The one that ends with "console" is what we want: screen -r 1240..ocim (or whatever the correct full name is).
  • There are multiple screen windows in that session including one that runs the Ocim app in the foreground. Be careful not to fiddle with it or kill it by accident.
  • You can switch around screens with CTRL+a -> SHIFT+" (press control and 'a' together, then shift and the double-quote key).
  • Select one until you find one where you're logged in as www-data in the ~/opencraft folder with the opencraft venv activated.
  • Run the following command to archive the instances: make manage 'archive_instances --domains=sandbox.example.com,test.example.com'
  • You can leave the screen session with CTRL+a -> d (control and 'a' together, then 'd').

If the screen session stuff is too complex or there's some other issue, for now you can do the following, but eventually you should get familiar with how screen works since you'll need it for redeployments:

  • Connect to Ocim using: [ssh command]
  • Switch to the www-data user using: sudo -Hu www-data bash
  • Go to the Ocim directory at /var/www/opencraft
  • Run the following command to archive the instances: make manage 'archive_instances --domains=sandbox.example.com,test.example.com'

h4. Helpful Links

[GNU Screen Cheat Sheet|https://gist.github.com/fredrick/1216878]

bb-3333 comments may be of some use, I've copied excerpts of anything I thought would be relevant

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant