Can't find Frappe directory in Google Cloud Platform Compute instance

OK; here’s the situation. I downloaded and installed ERPNext in a Virtual Box environment on my laptop, primarily to do accounting functions for my one man business (that’s me). All OK.

I then decided that I would like the service to be in the cloud (I keep all my other data in the Cloud) so I could access it anytime, so I signed up for Google’s “always free” small Compute engine, and migrated my Virtual Box environment to it using the free CloudEndure service (I didn’t want to do a clean re-install because I had data in ERPNext in the Virtual Box environment). All good.

I changed my DNS entries and the Google Cloud settings so I always got the same IP address and created a sub.domain. So far, so good.

Now, I want to create an https connection. Following instructions, I need to find frappe and frappe-bench and configure some stuff - but I can’t find it! It must be there somewhere, because ERPNext works a treat (can’t email stuff, but I’ll get to that once I’ve figured out https). Has anyone had the same problem and how did they figure it out?

By the way, I don’t have much experience with Unix/Linux-type systems, so I might be missing something basic.

All suggestions welcome…

Mike

I have no experience in GCP but regarding the location

your frappe and erpnext folders which hold the Github code are in apps folder which is under the frappe-bench folder.

does this VM migration shift the entire filesystem to the cloud - in that case it will be exactly where you installed it in your VM

Thanks for replying.

I’m not sure whether the entire filesystem is migrated; I can’t find frappe-bench either.

i don’t know but why not try and connect some client like FileZilla to your server which will let you see all filesystem.

however, try this

run sudo updatedb
then run locate <bench folder> bench folder is your instance folder name such as frappe-bench or whatever name you used in bench init command.

if not then run sudo updatedb and again use the same locate command

I’ve tried “locate” and “updatedb” but it doesn’t seem to be present in the bash shell that comes with the google cloud instance. I suspect I may be hampered by lack of basic knowledge here!

what is the output of the locate command though ?

Check the results of pwd. This command will return the path where you are currently at.

also try running ls. It will display all visible folders in the current directory.

try this two specifically:

ls -a ~ (List all folders in current user’s home)
ls -a /opt/ (Lists all folders in /opt) opt because a number of users seem to install bench there and follow the same for their instances too.

Check if frappe-bench or the folder is there or not.

The output from Locate and updatedb is:
mike_duncombe@cloudshell:/tmp (elegant-weaver-203910)$ locate
-bash: locate: command not found
mike_duncombe@cloudshell:/tmp (elegant-weaver-203910)$ updatedb
-bash: updatedb: command not found

I’ve tried the other commeands you suggest, and this is what I get:
mike_duncombe@cloudshell:~ (elegant-weaver-203910)$ ls -a
. … .bash_history .bash_logout .bashrc .config .docker .lesshst myoutput .orion .profile README-cloudshell.txt .ssh tem0.txt .viminfo
mike_duncombe@cloudshell:~ (elegant-weaver-203910)$ ls -a /opt/
. … gradle maven
mike_duncombe@cloudshell:~ (elegant-weaver-203910)$

I’ve used GCP and it’s usually set up as described here, assuming you’ve done the easy install.

1 Like

Thanks for replying. Yes, I had previously seen the post you refer to. It doesn’t help, unfortunately. This is what appears in my /home directory:

mike_duncombe@cloudshell:/home (elegant-weaver-203910)$ ls -a
. … lost+found mike_duncombe

mike_duncombe@cloudshell:~ (elegant-weaver-203910)$ ls -a /home/mike_duncombe
. … .bash_history .bash_logout .bashrc .config .docker .lesshst myoutput .orion .profile README-cloudshell.txt .ssh tem0.txt .viminfo

hmm there is a folder by your name

try cd mike_duncombe and run ls command again. What do you get ?

Nothing very helpful, I’m afraid:

mike_duncombe@cloudshell:/home (elegant-weaver-203910)$ cd mike_duncombe
mike_duncombe@cloudshell:~ (elegant-weaver-203910)$ ls -a
. … .bash_history .bash_logout .bashrc .config .docker .lesshst myoutput .orion .profile README-cloudshell.txt .ssh tem0.txt .vim .viminfo

It’s not going appear in your directory, it will be in the user “frappe”'s directory.

1 Like

Oh. So I have to login as Frappe? I’m not sure I know how to do that, but I’ll have a poke about.

You can log in as yourself. That brings you to your home directory, you need to go up one level and then into the user frappe directory. The “frappe-bench” folder is there.

OK, I’ve tried that. Still no joy. All I can see are lost+found and mike_duncombe, no frappe.

mike_duncombe@cloudshell:~ (elegant-weaver-203910)$ cd …
mike_duncombe@cloudshell:/home (elegant-weaver-203910)$ ls -a
. … lost+found mike_duncombe

cd ../ ← Maybe twice
ls ← Maybe twice
cd usr
ls
cd frappe
cd frappe-bench
bench version

HI guys, penny finally dropped. The way Google Cloud works is that the resources are managed from a separate instance running Cloudshell, which points to the server. So, when I was looking for frappe, I was looking on the instance running Cloudshell, not the instance running Frappe. You can login to the instance running frappe; then bingo, there’s the frappe directory:

Connected, host fingerprint: ssh-rsa 2048 36:48:D0:84:7D:87:1C:A4:A0:C4:AB:1D:68:92:DE:32:C6:8E:3C:22
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-79-generic i686)

  • Documentation: https://help.ubuntu.com/
    ERPNext VM (built on July 23, 2017)
    Please access ERPNext by going to http://localhost:8080 on the host system.
    Use port 3022 for SSH.
    We provide rock solid hosting for ERPNext : erpnext.com/pricing
    To update, login as
    username: frappe
    password: frappe
    ERPNext Administrator Login:
    username: Administrator
    password: admin
    cd frappe-bench
    bench update
    Last login: Sat Aug 4 14:34:21 2018 from 74.125.73.36
    mike_duncombe@erpnext-3374d241:~$ ls -a
    . … .bash_history .bash_logout .bashrc .cache .profile .ssh
    mike_duncombe@erpnext-3374d241:~$ cd …
    mike_duncombe@erpnext-3374d241:/home$ ls -a
    . … frappe mike_duncombe
    mike_duncombe@erpnext-3374d241:/home$

Thanks for your help, guys. You made me think so I could solve the problem - PICNIC, I believe (Problem in Chair not in computer!)