mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-02 16:02:15 +02:00
Merge branch 'main' into za/2301-fill-federal-agency-type
This commit is contained in:
commit
a3d9e208bb
63 changed files with 2675 additions and 775 deletions
|
@ -724,3 +724,31 @@ Example: `cf ssh getgov-za`
|
|||
|
||||
#### Step 1: Running the script
|
||||
```docker-compose exec app ./manage.py transfer_federal_agency_type```
|
||||
|
||||
## Email current metadata report
|
||||
|
||||
### Running on sandboxes
|
||||
|
||||
#### Step 1: Login to CloudFoundry
|
||||
```cf login -a api.fr.cloud.gov --sso```
|
||||
|
||||
#### Step 2: SSH into your environment
|
||||
```cf ssh getgov-{space}```
|
||||
|
||||
Example: `cf ssh getgov-za`
|
||||
|
||||
#### Step 3: Create a shell instance
|
||||
```/tmp/lifecycle/shell```
|
||||
|
||||
#### Step 4: Running the script
|
||||
```./manage.py email_current_metadata_report --emailTo {desired email address}```
|
||||
|
||||
### Running locally
|
||||
|
||||
#### Step 1: Running the script
|
||||
```docker-compose exec app ./manage.py email_current_metadata_report --emailTo {desired email address}```
|
||||
|
||||
##### Parameters
|
||||
| | Parameter | Description |
|
||||
|:-:|:-------------------------- |:-----------------------------------------------------------------------------------|
|
||||
| 1 | **emailTo** | Specifies where the email will be emailed. Defaults to help@get.gov on production. |
|
|
@ -32,9 +32,11 @@ For reference, the zip file will contain the following tables in csv form:
|
|||
* DomainInformation
|
||||
* DomainUserRole
|
||||
* DraftDomain
|
||||
* FederalAgency
|
||||
* Websites
|
||||
* Host
|
||||
* HostIP
|
||||
* PublicContact
|
||||
|
||||
After exporting the file from the target environment, scp the exported_tables.zip
|
||||
file from the target environment to local. Run the below commands from local.
|
||||
|
@ -75,17 +77,25 @@ For reference, this deletes all rows from the following tables:
|
|||
* DomainInformation
|
||||
* DomainRequest
|
||||
* Domain
|
||||
* User (all but the current user)
|
||||
* User
|
||||
* Contact
|
||||
* Websites
|
||||
* DraftDomain
|
||||
* HostIP
|
||||
* Host
|
||||
* PublicContact
|
||||
* FederalAgency
|
||||
|
||||
#### Importing into Target Environment
|
||||
|
||||
Once target environment is prepared, files can be imported.
|
||||
|
||||
If importing tables from stable environment into an OT&E sandbox, there will be a difference
|
||||
between the stable's registry and the sandbox's registry. Therefore, you need to run import_tables
|
||||
with --skipEppSave option set to False. If you set to False, it will attempt to save PublicContact
|
||||
records to the registry on load. If this is unset, or set to True, it will load the database and not
|
||||
attempt to update the registry on load.
|
||||
|
||||
To scp the exported_tables.zip file from local to the sandbox, run the following:
|
||||
|
||||
Get passcode by running:
|
||||
|
@ -107,7 +117,7 @@ cf ssh {target-app}
|
|||
example cleaning getgov-backup:
|
||||
cf ssh getgov-backup
|
||||
/tmp/lifecycle/backup
|
||||
./manage.py import_tables
|
||||
./manage.py import_tables --no-skipEppSave
|
||||
|
||||
For reference, this imports tables in the following order:
|
||||
|
||||
|
@ -118,9 +128,11 @@ For reference, this imports tables in the following order:
|
|||
* HostIP
|
||||
* DraftDomain
|
||||
* Websites
|
||||
* FederalAgency
|
||||
* DomainRequest
|
||||
* DomainInformation
|
||||
* UserDomainRole
|
||||
* PublicContact
|
||||
|
||||
Optional step:
|
||||
* Run fixtures to load fixture users back in
|
Loading…
Add table
Add a link
Reference in a new issue