[ ] Please put copy of the db dump in the private FEC GoogleDocs
--- OR---
[ ] Do this in production in the CloudFoundry CLI...Wiki below (Ask @johnnyporkchops if questions)
WIKI for scraping and indexing CMS pages in production using CloudFoundry CLI
- This is basically the same as the local process but you do not need to get a database dump first.
1) Login to CloudFoundry and target space:
`cf target -s prod`
2) SSH into CMS:
`cf ssh cms`
3) Configure for Python:
`export DEPS_DIR=/home/vcap/deps`
`for f in /home/vcap/profile.d/*.sh; do source "$f"; done`
4) `cd app/fec`
5) `./manage.py scrape_cms_pages`
This will create output.json at /search/management/data/
6) Export the env vars for the drawer for the shell session:
- `export SEARCHGOV_DRAWER_KEY_MAIN=xxxx`
- `export SEARCHGOV_DRAWER_HANDLE=xxxx`
Note: You can get these creds using `cf env cms` in a new tab
Verify that the env var creds are there:
`echo $SEARCHGOV_DRAWER_KEY_MAIN`
Note: You cannot verify the env vars by just typing “env” like you could on your local because that will show local env vars, but not those available to the cloud shell session you are in.
7) `./manage.py index_pages`
8) Remove the output.json file for good measure since it’s git-ignored and not part of the repo:
`rm search/management/data/output.json`
[ ] Create ticket for June '23 manual Wagtail global search index
Note: If you are sharing a screenshot of the dashboard as confirmation of latest index dates, be sure to NOT to include the key in your screenshot area.
Summary
What we're after: Update the global search.gov index for new pages that were published since last index March, 2023.
Related issues https://github.com/fecgov/fec-cms/issues/5624
Completion criteria:
[ ] Follow instructions under Adding CMS pages to the index
--- OR---
[ ] Do this in production in the CloudFoundry CLI...Wiki below (Ask @johnnyporkchops if questions)
WIKI for scraping and indexing CMS pages in production using CloudFoundry CLI
- This is basically the same as the local process but you do not need to get a database dump first. 1) Login to CloudFoundry and target space: `cf target -s prod` 2) SSH into CMS: `cf ssh cms` 3) Configure for Python: `export DEPS_DIR=/home/vcap/deps` `for f in /home/vcap/profile.d/*.sh; do source "$f"; done` 4) `cd app/fec` 5) `./manage.py scrape_cms_pages` This will create output.json at /search/management/data/ 6) Export the env vars for the drawer for the shell session: - `export SEARCHGOV_DRAWER_KEY_MAIN=xxxx` - `export SEARCHGOV_DRAWER_HANDLE=xxxx` Note: You can get these creds using `cf env cms` in a new tab Verify that the env var creds are there: `echo $SEARCHGOV_DRAWER_KEY_MAIN` Note: You cannot verify the env vars by just typing “env” like you could on your local because that will show local env vars, but not those available to the cloud shell session you are in. 7) `./manage.py index_pages` 8) Remove the output.json file for good measure since it’s git-ignored and not part of the repo: `rm search/management/data/output.json`Note: If you are sharing a screenshot of the dashboard as confirmation of latest index dates, be sure to NOT to include the key in your screenshot area.