Skip to content

Commit

Permalink
Merge branch 'master' into feature/APPEALS-9414
Browse files Browse the repository at this point in the history
  • Loading branch information
ThorntonMatthew authored Jul 13, 2023
2 parents c3a82f5 + 9a6b420 commit c301f8a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 59 deletions.
91 changes: 44 additions & 47 deletions MAC_INTEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[<< Back](README.md)

**Pre-requisites for setup:**
**Some steps require completing VA On-boarding**

1. Create GitHub user account [VA github access process](https://department-of-veterans-affairs.github.io/github-handbook/guides/onboarding/getting-access)

Expand All @@ -20,46 +21,37 @@
2. Install Homebrew
* a. Using BAH Self Service if BAH employee Run ```brew install git-lfs .``` This is required to clone caseflow-facols repo

3. Create a caseflow-setup folder by typing: `mkdir caseflow-setup` (step can be skipped if you have the file transfer files)
3. Create an appeals folder by typing: `mkdir ~/appeals`

4. Change directory to caseflow-setup by typing: `cd caseflow-setup`
4. Change directory to appeals by typing: `cd appeals`

5. Navigate to [instant client](https://www.oracle.com/database/tecdchnologies/instant-client/linux-x86-64-downloads.html)

6. Download the following zip files to caseflow-setup directory (Copy from downloads to the caseflow-setup directory if they download to downloads) (Step can be skipped if you received the file transfer files)
6. Download the following zip files (Step can be skipped if you received the file transfer files)
* instantclient-basic-linux.x64-12.2.0.1.0.zip
* instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
* instantclient-sdk-linux.x64-12.2.0.1.0.zip

7. Clone caseflow repositories required for setup into caseflow-setup directory (caseflow-facols requires github account and the account has to be in the VA org in github and can be found in the file transfer files) pwd
* HTTP protocol
* `git clone https://github.com/department-of-veterans-affairs/caseflow.git`
* `git clone https://github.com/department-of-veterans-affairs/caseflow-facols.git`
* Upon completion, navigate to caseflow-facols (`cd ~/caseflow-setup/caseflow-facols`)
* Run: `git lfs install` (needed to initialize large file storage in repo)
* Run: `git lfs pull` (this will pull the large zipfile)
* If you do not have VA access yet to clone caseflow-vacols can contact (Your Tech lead or the bid_appeals_mac_support channel) to receive a zip of the repository
7. Clone the following caseflow repositories required into appeals directory
* https://github.com/department-of-veterans-affairs/caseflow
* https://github.com/department-of-veterans-affairs/caseflow-facols

**SSH protocol**
8. Upon completion, navigate to caseflow-facols (`cd ~/appeals/caseflow-facols`)
1. Run: `git lfs install` (needed to initialize large file storage in repo)
2. Run: `git lfs pull` (this will pull the large zipfile)
3. Copy the `~/appeals/caseflow-facols/build_facols` directory into `~/appeals/caseflow/local/vacols/` directory.

1. `git clone git@github.com:department-of-veterans-affairs/caseflow.git`
9. Navigate to the caseflow directory in your terminal (type: `cd ~/appeals/caseflow`) and checkout the grant/setup-no-aws branch `git checkout grant/setup-no-aws`

2. `git clone git@github.com:department-of-veterans-affairs/caseflow-facols.git`
* Upon completion, navigate to caseflow-facols (`cd ~/caseflow-setup/caseflow-facols`)
* Run: `git lfs install` (needed to initialize large file storage in repo)
* Run: `git lfs pull` (this will pull the large zipfile)
10. Navigate to caseflow/docker-bin directory (type: `cd docker-bin`)

3. Navigate to the caseflow directory in your terminal (type: `cd ~/caseflow-setup/caseflow`) and checkout the grant/setup-no-aws branch `git checkout grant/setup-no-aws`
11. Create oracle_libs subdirectory (type: `mkdir oracle_libs`)

4. Navigate to caseflow/docker-bin directory (type: `cd docker-bin`)
12. Copy the 3 instant-client zip files from step 6 into the oracle_libs directory

5. Create oracle_libs subdirectory (type: `mkdir oracle_libs`)
13. Navigate to the caseflow root directory (type: `cd ~/appeals/caseflow`)

6. Copy the 3 instant-client zip files from the caseflow-setup directory into the oracle_libs directory

7. Navigate to the caseflow root directory (type: `cd ..`)

8. Run scripts/dev_env_setup_step1.sh script from bash terminal (How to run script in Mac Terminal) (Will be prompted for a password will be the SUDO password which is the password used to log into mac after restart)
14. Run `scripts/dev_env_setup_step1.sh` script from bash terminal [[How to run script in Mac Terminal](https://apple.stackexchange.com/questions/235128/how-do-i-run-a-sh-or-command-file-in-terminal)] (Will be prompted for a password will be the SUDO password which is the password used to log into mac after restart)
* If/When mac says Chromedriver cannot be opened do this:
* Click cancel on the warning modal
* Push Command + Space
Expand All @@ -68,50 +60,55 @@
* Click General tab
* Click the lock icon and put in your BAH pin Click allow anyway on chromedriver warning Click the lock icon to re lock

9. Setup Docker to use 4 CPUs and 8G memory and sign-in to your personal DockerHub account
15. Setup Docker to use 4 CPUs and 8G memory and sign-in to your personal DockerHub account
* To get to these settings:
* Command + Space
* Type docker
* Click docker desktop
* Click the gear icon
* Click Resources

10. The script updated your bash profile and you need to resource it into the terminal by typing: `source ~/.bash_profile`
16. The script updated your bash profile and you need to resource it into the terminal by typing: `source ~/.bash_profile`
* If using zsh, will need to update and `source ~/.zshrc` instead

11. `brew install shared-mime-info`
17. `brew install shared-mime-info`

12. `brew install v8@3.15`
18. `brew install v8@3.15`

13. Run scripts/dev_env_setup_step2.sh script (may take a while to run)
19. Run `scripts/dev_env_setup_step2.sh` script (may take a while to run)

14. Run `gem install bundler`
* Copy the caseflow-facols/build_facols directory to the caseflow/local/vacols subdirectory. (Ensure you have a caseflow/local/vacols/build_facols directory with all the files before continuing to the next step)
20. Run `gem install bundler`

15. Navigate to caseflow/local/vacols in terminal `cd ~/caseflow- setup/caseflow/local/vacols`
21. Navigate to `~/appeals/caseflow/local/vacols` in terminal (type: `cd ~/appeals/caseflow/local/vacols`)

16. Run `./build_push.sh local`
* Requires the oracle database image to have been pulled after running scripts/dev_env_setup_step1.sh script
22. To install the latest and enterprise Oracle Database version follow (https://seanstacey.org/deploying-an-oracle-database-19c-as-a-docker-container/2020/09/) guide.
1. Go to http://container-registry.oracle.com/ (Here log in and opt for Database)
2. On command line `docker login container-registry.oracle.com`
3. On command line `docker pull container-registry.oracle.com/database/enterprise:latest`

17. Navigate to caseflow root directory `cd ~/caseflow-setup/caseflow`
23. Run `./build_push.sh local`

18. Run `docker-compose up –d`
24. Navigate to caseflow root directory `cd ~/appeals/caseflow`

19. Run `bundle exec rake db:create`
* If you get connection issues stating no file to be found, run the following:
* `rm /opt/homebrew/var/postgres/postmaster.pid` or possibly `rm /usr/local/var/postgres/postmaster.pid`
* `brew services restart postgresql`
25. Run `ln -s Makefile.example Makefile`

20. Run `bundle exec rake local:vacols:seed`
26. Run `make up`

21. Run `bundle exec rake db:schema:load db:seed`
27. Run `make reset`
* If issues occur:
1. Run `bundle exec rake db:create`
* If you get connection issues stating no file to be found, run the following:
* `rm /opt/homebrew/var/postgres/postmaster.pid` or possibly `rm /usr/local/var/postgres/postmaster.pid`
* `brew services restart postgresql`
2. Run `bundle exec rake local:vacols:seed`
3. Run `bundle exec rake db:schema:load db:seed`

22. Open a new tab in terminal
27. Open a new tab in terminal

23. In new tab run make: ```run-backend```
28. In new tab run make: ```run-backend```

24. In the old tab run: ```make run-frontend```
29. In the old tab run: ```make run-frontend```

25. Navigate to localhost:3000 in browser to see the application
30. Navigate to localhost:3000 in browser to see the application

[<< Back](README.md)
11 changes: 4 additions & 7 deletions scripts/dev_env_setup_step1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,10 @@ echo "1. Run Docker and go into advanced preferences to limit Docker's resources
Recommended settings are 4 CPUs, 8 GiB of internal memory, and 512 MiB of swap.
"

echo "2. In a new terminal, run:
docker login -u dsvaappeals
The password is in the DSVA 1Password account.
Note you can use your personal account as well, you'll just have to accept
the license agreement for the Oracle Database docker image.
https://store.docker.com/images/oracle-database-enterprise-edition
To accept the agreement, checkout with the Oracle image on the docker store.
echo "2. To install the latest and enterprise Oracle Database version follow (https://seanstacey.org/deploying-an-oracle-database-19c-as-a-docker-container/2020/09/) guide.
1. Go to http://container-registry.oracle.com/ (Here log in and opt for Database)
2. On command line docker login container-registry.oracle.com
3. On command line docker pull container-registry.oracle.com/database/enterprise:latest
"

echo "==> Close this terminal, open a new terminal, and run ./dev_env_setup_step2.sh
Expand Down
6 changes: 1 addition & 5 deletions scripts/dev_env_setup_step2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ ln -s Makefile.example Makefile

echo "
===================================
You must do the following manually:
AWS access is needed starting at this point.
If you need to get AWS access, follow these instructions:
https://github.com/department-of-veterans-affairs/appeals-deployment/wiki/New-Hires
Congratulations
"

echo 'Finish the manual set up from "Database environment setup":
Expand Down

0 comments on commit c301f8a

Please sign in to comment.