@@ -14,74 +14,3 @@ workflow that adapts to the conventions of all groups.
14
14
## Testing
15
15
16
16
` pip install tox ` into your virtualenv, then ` tox ` .
17
-
18
- ## Deployment
19
-
20
- Ensure you have the necessary libraries by running ` pip install -r requirements-dev.txt `
21
- in a virtualenv of your choosing.
22
-
23
- 1 . Ensure all changes are committed
24
- 2 . Run the tests (` tox ` )
25
- 3 . Deploy to the dev instance with ` fab deploy ` . Ensure the script
26
- runs successfully.
27
- 1 . Check that the [ the dev site] ( https://montage-dev.toolforge.org/meta/ )
28
- came back up fine.
29
- 2 . Log in and test things out.
30
- 3 . Check the [ montage-dev sentry (devlabs)] ( https://sentry.io/organizations/hatnote/issues/?environment=devlabs&project=3532775 )
31
- 4 . Use [ the audit log] ( https://montage.toolforge.org/montage/v1/logs/audit )
32
- to check that the production instance isn't in active use.
33
- 5 . Deploy to the production instance with ` fab deploy:tool=montage `
34
- 1 . Check that the [ the production site] ( https://montage.toolforge.org/montage/meta/ )
35
- came back up fine.
36
- 2 . Log in and test things out.
37
- 3 . Check the [ montage sentry (prod)] ( https://sentry.io/organizations/hatnote/issues/?environment=prod&project=3532775 )
38
-
39
- Some tips (at the time of writing):
40
-
41
- - ` fab deploy ` without arguments will deploy ` master ` to ` montage-dev ` .
42
- - To change this, use a command of this format:
43
- ` fab deploy:branch=other-branch,tool=montage-beta `
44
- - It will fail with a helpful message if your branch is not sync'd
45
- with origin. Push those commits!
46
- - If you see a huge golang stack trace from ` fab deploy ` , it's likely
47
- [ this bug] ( https://phabricator.wikimedia.org/T219070 ) . These seem to
48
- fix themselves, come back later if you can, otherwise check out the
49
- thread for details on using ` GOMAXPROCS ` .
50
- - All this only deploys the backend for now.
51
-
52
- ### Installing on toolforge from scratch
53
-
54
- 2024-04-23
55
-
56
- 1 . Create new $HOME/www/python
57
- 1 . Symlink src to repo clone
58
- 1 . Use webservice to create new venv
59
- - See notes below
60
- 1 . Create / copy over prod config
61
- 1 . Create / copy over uwsgi.ini
62
- 1 . Upload / copy over static
63
- - cp -r ~ /(ORIG_LOCATION)/static/ ~ /www/python/src/montage/static/
64
-
65
- #### venv notes
66
-
67
- This mostly works: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web/Python#Creating_a_virtual_environment
68
-
69
- But before that you should install mysqlclient explicitly:
70
-
71
- ```
72
- export MYSQLCLIENT_CFLAGS="-I/usr/include/mariadb/"
73
- export MYSQLCLIENT_LDFLAGS="-L/usr/lib/x86_64-linux-gnu/ -lmariadb"
74
- pip install mysqlclient
75
- ```
76
-
77
- From https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Python:_Django
78
-
79
- ## Database administration notes
80
-
81
- With the move to mariadb, the easiest way to access Montage's own data (not the replicas) is:
82
-
83
- ```
84
- # on toolforge, become montage
85
- $ sql tools
86
- > use s53490__montage;s
87
- ```
0 commit comments