Closed AlanKK closed 2 months ago
This first issue is at the bottom of the readme.
https://github.com/PierreBeucher/cloudypad?tab=readme-ov-file#known-issues
Select gRPC FUSE in the Docker Desktop settings
Hi there, thanks for taking time to create an issue :) Pre-requisites are listed in Getting Started (you need Docker, Moonlight and a clouder account), though it's a bit buried in the doc admittedly. I plan on creating a proper doc website like I did for Novops and Novops doc
First issue is indeed known as commented by @chocolatemoo53 , I'll make sure to list it with requirements on top of doc.
For the second one:
$ cloudypad create Error: could not build CloudyPad container image, build exited with code: 1 Build command was: docker build -t crafteo/cloudypad-local-runner:local - < /tmp/Dockerfile-cloudypad-run 2>&1 Build output: ERROR: open /Users/alan/.docker/buildx/activity/desktop-linux: permission denied
That's new to me, it may not be related to Cloudy Pad but something that changed the .docker
directory permission in the past. Can you try:
sudo chown -R $(whoami) ~/.docker
Thanks. @chocolatemoo53, the new docker desktop has the gRPC setting under config > general.
I do have some docker issue on my mac. I created a fresh install of ubuntu to keep moving forward. I installed the AWS cli and configured it. Here are my latest two issues:
$ sudo .cloudypad/bin/cloudypad create
.cloudypad/bin/cloudypad: line 36: /tmp/Dockerfile-cloudypad-run: Permission denied
? Select Cloud provider: aws
? Enter instance name: Win10_v9
No SSH private key found in /home/parallels/.ssh. You can generate one with 'ssh-keygen -t ed25519 -a 100'.
? Please enter path to a valid SSH private key to create your instance: ~/.ssh/id_rsa
Using SSH private key ~/.ssh/id_rsa
Creating instance Win10_v9
? Choose an instance type: g4dn.xlarge
? Enter desired disk size (GB): 100
? Use static Elastic IP or dynamic IP? : static
/cloudypad/node_modules/@smithy/config-resolver/dist-cjs/index.js:117
throw new Error("Region is missing");
^
Error: Region is missing
at default (/cloudypad/node_modules/@smithy/config-resolver/dist-cjs/index.js:117:11)
at /cloudypad/node_modules/@smithy/node-config-provider/dist-cjs/index.js:90:104
at /cloudypad/node_modules/@smithy/property-provider/dist-cjs/index.js:97:33
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at coalesceProvider (/cloudypad/node_modules/@smithy/property-provider/dist-cjs/index.js:124:18)
at /cloudypad/node_modules/@smithy/property-provider/dist-cjs/index.js:135:20
at AwsInitializerPrompt.getCurrentRegion (/cloudypad/dist/src/providers/aws/initializer.js:116:16)
at AwsInitializerPrompt.region (/cloudypad/dist/src/providers/aws/initializer.js:107:34)
at AwsInitializerPrompt.prompt (/cloudypad/dist/src/providers/aws/initializer.js:45:24)
at AwsInstanceInitializer.runProvisioning (/cloudypad/dist/src/providers/aws/initializer.js:19:22)
Something in /tmp/Dockerfile-cloudypad-run caused the permission denied. I am running this with sudo. I didn't see anything in there that would stop me from continuing so I kept going.
The missing AWS region error was next. Where is it picking this up from? I have it in my ~/.aws/config file. I hardcoded us-east-1 and ran it again. This is what happened:
$ sudo .cloudypad/bin/cloudypad create
.cloudypad/bin/cloudypad: line 36: /tmp/Dockerfile-cloudypad-run: Permission denied
? Select Cloud provider: aws
? Enter instance name: Win10_v9
No SSH private key found in /home/parallels/.ssh. You can generate one with 'ssh-keygen -t ed25519 -a 100'.
? Please enter path to a valid SSH private key to create your instance: ~/.ssh/id_rsa
Using SSH private key ~/.ssh/id_rsa
Creating instance Win10_v9
? Choose an instance type: g4dn.xlarge
? Enter desired disk size (GB): 100
? Use static Elastic IP or dynamic IP? : static
? Enter AWS region to use: us-east-1
/cloudypad/dist/src/providers/aws/provisioner.js:124
throw new Error(`Couldn't check AWS authentication: ${JSON.stringify(e)}`);
^
Error: Couldn't check AWS authentication: {}
at AwsProvisioner.checkAwsAuth (/cloudypad/dist/src/providers/aws/provisioner.js:124:19)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at AwsProvisioner.provision (/cloudypad/dist/src/providers/aws/provisioner.js:27:13)
at AwsInstanceInitializer.runProvisioning (/cloudypad/dist/src/providers/aws/initializer.js:27:9)
at AwsInstanceInitializer.initializeInstance (/cloudypad/dist/src/core/initializer.js:106:9)
aws sts get-caller-identity works fine so I don't know why I am having these AWS cli issues.
Why are you running with sudo? I guess it then tries to use root
AWS creds instead of your own user, resulting in looking at /root/.aws
instead of /home/<you>/.aws
.
Error: Couldn't check AWS authentication: {}
This error is not well explanatory, but an empty response is given by AWS SDK when authentication fail - it means somehow credentials could not be found (I think because of sudo as said above)
.cloudypad/bin/cloudypad: line 36: /tmp/Dockerfile-cloudypad-run: Permission denied
This is a permission denied when writing to /tmp/Dockerfile-cloudypad-run
in main script (see https://github.com/PierreBeucher/cloudypad/blob/master/cloudypad.sh#L36). It's odd as running as root
you shouldn't have such issues... Unless the /tmp
folder is mounted in a special way ? (such as shared with your Mac machine ?)
Anyway, try to:
~/.aws/config
specify a region for default config (it seems you already did "hardcode" it as you said, just in case), eg.:
[default]
region = us-east-1
output = json
/tmp/Dockerfile-cloudypad-run
file to try and solve this odd permission issue~/.cloudypad
(since you ran as root some files may have been created as root), eg. chown -R "$(id -u):$(id -g)" ~/.cloudypad
sudo
I got it working a while back. I have to use sudo to run docker commands. When I got files in the right places, it worked. Impressive automation.
A good set of prerequisites in the README would be nice. I am just starting to play with this to see if I can get it to work. The first issue I ran into is Docker must be installed locally.
Then ...
On an Intel Mac:
$ cloudypad create docker: Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.luZfBD4bs2/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.luZfBD4bs2/Listeners: operation not supported.
ChatGPT helped with this and said: Ensure that the parent directory of your mount path is shared with Docker:
I added /private/tmp and got a little further to:
$ cloudypad create
Error: could not build CloudyPad container image, build exited with code: 1 Build command was: docker build -t crafteo/cloudypad-local-runner:local - < /tmp/Dockerfile-cloudypad-run 2>&1 Build output: ERROR: open /Users/alan/.docker/buildx/activity/desktop-linux: permission denied
This is all I have time for today. I do hope to get this working. I was looking into something similar but you seem to be much further along.