GithubHelp home page GithubHelp logo

Comments (28)

marrobi avatar marrobi commented on June 9, 2024

Looks like a permission denied issue. When you move scripts on a linux file system you may need to grant execute permission using chmod +x ./delete_vm_extensions.sh prior to building the bundle.

Let us know how you get on.

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

within VScode the files do have the correct permissions.
image

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

when copying the windows template from azuretre to our deployment. can i copy just that folder? or do i have to copy the whole structure including the guacamole server templates too ?

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

Ok, can you check within the bundle, find the image ID of the cloukubed-azure-windowsvm image using docker images

Then run:

vscode ➜ /workspaces/marrobi-azure-tre (main) $ docker run -it 84c482413687  bash
nonroot@921195ae47d2:/cnab/app$ ls -ltr
total 56
-rwxrwxr-x 1 root root  584 Nov  2  2022 reset_password.sh
-rwxrwxr-x 1 root root 1122 Nov  2  2022 delete_vm_extensions.sh
-rw-rw-r-- 1 root root 1336 Feb  2 22:22 template_schema.json
-rwxrwxr-x 1 root root 1635 Apr 29 14:18 parameters.json
-rw-rw---- 1 root root 9958 Jun 23 09:38 porter.yaml
-rwxrwx--- 1 root root  117 Jun 23 09:38 run
drwxrwxr-x 1 root root 4096 Jun 23 09:38 runtimes
drwxrwx--- 1 root root 4096 Jun 23 09:38 mixins
drwxrwxr-x 1 root root 4096 Jun 23 09:38 terraform

Check the permissions, and try running the delete_vm_extensions.sh script (it will fail, but should run)

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

i dont appear to have one running locally?
however i do have docker and containers running

sudo docker images | grep cloukubed-azure-windowsvm
returns nothing ?

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

The command I used runs one in interactive mode.

Have you missed a d from cloudkubed?

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

that was just a typo sorry.
sudo docker images | grep cloud
returns nothing.

so my vscode is opened in dev container but i did all the deployment in git pipeline. Have a missed a step, setting up the docker images locally?

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

Ah, ok, if just using a pipeline you are unlikely to be able to debug locally.

To build and register locally use make user_resource_bundle BUNDLE=cloudkubed-azure-windowsvm WORKSPACE_SERVICE=guacamole

Registration might fail depending on local config, but the image should build and then you will see it in docker images.

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

i tried the above command and a few variations of it but failing but it is most definitely there at that location.

/bin/bash: line 4: cd: /home/vscode/AzureTRE//templates/workspace_services/guacamole/user_resources/cloudkubed-azure-windowsvm: No such file or directory
make[1]: *** [/home/vscode/AzureTRE/Makefile:183: bundle-build] Error 1
make[1]: Leaving directory '/workspaces/tre11d'
make: *** [/home/vscode/AzureTRE/Makefile:284: user_resource_bundle] Error 2

inside my porter file is this

schemaVersion: 1.0.0
name: tre-service-guacamole-windowsvm-ck
version: 0.7.4
description: "An Azure TRE User Resource Template for Guacamole (Windows 10)"
dockerfile: Dockerfile.tmpl
registry: azuretre

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

Does this folder exist?

/home/vscode/AzureTRE//templates/workspace_services/guacamole/user_resources/cloudkubed-azure-windowsvm

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

yes it does. Its most definitely there. with the right permissions etc
image

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

also here is the original AzureTRE templates i copied from

image

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

Can you try just running porter build in the directory? Thanks.

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

Actually, worth checking, is the repo checked out to Windows or Linux file system?

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

porter build has completed successfully.

this is checked out to Windows with WSL running underneath, docker running too etc

subsequent command however still failed
make user_resource_bundle BUNDLE=cloudkubed-azure-windowsvm WORKSPACE_SERVICE=guacamole

/bin/bash: line 4: cd: /home/vscode/AzureTRE//templates/workspace_services/guacamole/user_resources/cloudkubed-azure-windowsvm: No such file or directory
make[1]: *** [/home/vscode/AzureTRE/Makefile:183: bundle-build] Error 1
make[1]: Leaving directory '/workspaces/tre11d'
make: *** [/home/vscode/AzureTRE/Makefile:284: user_resource_bundle] Error 2

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

Ok, I reckon that could be the issue. There is a PR to add something to the docs for #3551

At the end of the porter build do you see:

 => => writing image sha256:2d1f9128e899dbe3ceeebb2e7268614a351a99b754331a58163a442bcc6bbf14                                                                                                                                                                                                   0.0s
 => => naming to docker.io/azuretre/tre-service-guacamole-linuxvm:porter-6932c599d5e3c317413ce4547b0a62f1                                                                                                                                                                                      

Then run:

docker run -it <docker.io/azuretre/tre-service-guacamole-linuxvm:porter-6932c599d5e3c317413ce4547b0a62f1> bash

With your image name as per porter output and check the permissions.

We typically checkout inside WSL, rather than on Windows and think that could be the cause.

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

thanks ok so a slight difference between windows and linux.

here was the output

image

and i beleive this is the image i need to connect to now ?

image

once i've got through all this i will put a PR in with documentation updates etc

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

You are missing bash of the end of the command to get a prompt inside the container where you can check the permissions.

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

indeed i did! good spot. All permissions look fine inside

image

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

Very strange. My next steps would be to try installing/uninstalling locally using make bundle-install and bundle-uninstall. Is a bit tricky.

You are building the images in the pipeline right? So they will be on a Linux filesystem there. I'm a bit confused, might have to check if anybody else has any ideas.

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

i forgot to say as well.
i can run the command fine once logged in
./delete_vm_extensions.sh <resource_group> tfstate f548bd1f-8cf7-41b0-a41d-1909ce5657ce

image

./exec-runtime uninstall did literally nothing but hung for 30 mins

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

Also over the weekend i've tested in a second environment and also with Linux and im experiencing the same behaviour

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

Would it potentially behave differently if we put our templates in the same location as the default templates in azuretre? Also i assume other people have custom templates with custom VM's in place without an issue ?

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

Let me check how other customers are using the custom VM templates.

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

So to build user resource templates in the deployment repo you can use:

DIR=./path/to/my/templates BUNDLE_TYPE=user_resource WORKSPACE_SERVICE_NAME=tre-service-guacamole make bundle-build bundle-publish bundle-register 

As for the delete issue, still not clear why that is happening, will talk with the wider team.

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

Thanks @marrobi . Yes we are building like that but obviously via the pipeline rather than manual.

from azuretre.

Danny-Cooke-cCK avatar Danny-Cooke-cCK commented on June 9, 2024

@marrobi have you guys had chance to look at this ?

I was wondering, could the issue be related to using images from an internal gallery instead of images from the market place ?

from azuretre.

marrobi avatar marrobi commented on June 9, 2024

@Danny-Cooke-cCK did you get this resolved?

from azuretre.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.