Closed sebastian-luna-valero closed 2 years ago
Hi @sebastian-luna-valero,
You are missing the line of the Infrastructure Manager auth.
You have to add this line to the auth.dat
file:
id = im; type = InfrastructureManager; token = command(oidc-token OIDC_ACCOUNT)
It works, thanks!
FYI, I took the EGI config from: https://imdocs.readthedocs.io/en/latest/client.html#examples
Not sure where to submit a PR ;)
In these examples you can see that the two first lines show the Infrastructure Manager auth lines. But I will try to check the docs to explain better that the Infrastructure Manager auth line must be allways in the auth file.
That would be helpful, thanks. I didn't understand that when reading the docs.
Does this mean that I need one line per site in the EGI federation where I want to create virtual infra with im-client
?
You only need to add one line per each site/vo you want to access.
Thanks!
If I now try to deploy a test with: https://github.com/grycap/im-client/blob/master/test/files/tosca.yml
I get:
$ im_client.py create tosca.yaml
Secure connection with: https://appsgrycap.i3m.upv.es:31443/im/
ERROR creating the infrastructure: Error Creating Inf.: No correct VMRC auth data provided nor image URL
I have updated the auth.dat
with:
id = im; type = InfrastructureManager; token = command(cat /var/run/secrets/egi.eu/access_token)
type = VMRC; host = http://appsgrycap.i3m.upv.es:32080/vmrc/vmrc/; token = command(oidc-token OIDC_ACCOUNT)
id = egi; type = EGI; host = ULAKBIM; vo = vo.access.egi.eu; token = command(oidc-token OIDC_ACCOUNT)
and tosca.yaml
with:
description: TOSCA test for the IM client
topology_template:
node_templates:
server:
type: tosca.nodes.Compute
capabilities:
# Host container properties
host:
properties:
num_cpus: 1
mem_size: 1 GB
# Guest Operating System properties
os:
properties:
# host Operating System image properties
type: linux
distribution: ubuntu
version: 20.04
You have to add an image of the VM, and change the compute node type:
server:
type: tosca.nodes.indigo.Compute
capabilities:
# Host container properties
host:
properties:
num_cpus: 1
mem_size: 1 GB
# Guest Operating System properties
os:
properties:
# host Operating System image properties
type: linux
distribution: ubuntu
version: 20.04
image: appdb://ULAKBIM/egi.ubuntu.20.04
The image uri has the following format:
appdb://
As commented here:
https://imdocs.readthedocs.io/en/latest/radl.html?highlight=appdb#system-features
I saw that the name of the site is not the one that is registered in the AppDB: it should be TR-FC1-ULAKBIM
.
So the image should be: appdb://TR-FC1-ULAKBIM/egi.ubuntu.20.04
Many thanks!
Just a couple of final questions before closing the issue.
Q1: Can you achieve idempotency with TOSCA?
# i.e. running this
im_client.py create tosca.yaml
# and this again without changes in tosca.yaml
im_client.py create tosca.yaml
will create two separate virtual infrastructures, right?
Q2: In order to improve the portability of deployments, instead of using an image URL for deployments
os:
properties:
image: appdb://egi.ubuntu.20.04?vo.access.egi.eu
is it possible to use only:
os:
properties:
type: linux
distribution: ubuntu
version: 20.04
The same way that we do for:
host:
properties:
num_cpus: 2
mem_size: 4 GB
Many thanks, Sebastian
Q1: Can you achieve idempotency with TOSCA?
# i.e. running this im_client.py create tosca.yaml # and this again without changes in tosca.yaml im_client.py create tosca.yaml
will create two separate virtual infrastructures, right?
Yes.
Q2: In order to improve the portability of deployments, instead of using an image URL for deployments
os: properties: image: appdb://egi.ubuntu.20.04?vo.access.egi.eu
is it possible to use only:
os: properties: type: linux distribution: ubuntu version: 20.04
The same way that we do for:
host: properties: num_cpus: 2 mem_size: 4 GB
It is not so easy. We are working to make it work as you commented searching the images in the AppDBIS instead of using our VMRC. But it is not available yet.
Great, thanks again!
Hello,
I am testing
im-client
with:and
auth.dat
:Here is what I get:
Am I missing something basic?
Many thanks, Sebastian