Forem Creators and Builders 🌱

Discussion on: Forem Google Cloud Setup on MacOS

Collapse
 
ellativity profile image
Ella (she/her/elle)

Hey @davidmimay

I asked our team who built the playbook and they're suspecting this error is from a missing python dependency (requests) on the local machine you're running the provisioning from rather than a problem with the target machine. Did you run the semi-automated or Manual installation?

If Manual, what happened when you followed the instruction to Install Python dependencies System-wide: pip3 install -r requirements.txt?

Additionally, GCP Setup Step 2 mentions the pip3 modules that need to be installed, which includes requests: github.com/forem/selfhost#setup-2 - did you do this successfully without errors as well?

Thanks for any additional info you can provide us with to help figure out why you're getting this error message!

Collapse
 
davidmimay profile image
david mimay

Thanks for helping me out!

Yes, I run the semi-automated and also the manual installation just to be sure:
pip3 install -r requirements.txt
gave me: Requirement already satisfied:...

The GCP Setup Step 2 was successfull:
ansible-galaxy collection install google.cloud and also
ansible-galaxy collection install -r requirements.yml
gave me: Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using --force.

Solved: It was my fault, my issue was in inventory/forem/setup.yml i've been using ansible_python_interpreter: /usr/bin/python3 , but as the side node says # on macOS, this may need to be /usr/local/bin/python3 (im on macOS Catalina 10.15.3), it works when I changed to /usr/local/bin/python3.

Running again: ansible-playbook -i inventory/forem/setup.yml playbooks/providers/gcp.yml
gave me:

TASK [Create a FCOS disk] ******************************************************
fatal: [forem]: FAILED! => changed=false 
  msg: 'GCP returned error: {''error'': {''code'': 403, ''message'': ''Compute Engine API has not been used in project ******** before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=***** then retry. …
Enter fullscreen mode Exit fullscreen mode

And just following the url and clicking enable on the API made it works.
forem.dev/remoteimages/uploads/art...