xlab-si / xopera-opera

xOpera orchestrator compliant with TOSCA YAML v1.3 in the making
https://xlab-si.github.io/xopera-docs/
Apache License 2.0
35 stars 14 forks source link

help with deployment on non-conventional clouds #264

Open MohammadErfan-Jabbari opened 1 year ago

MohammadErfan-Jabbari commented 1 year ago

Hello everyone, hope you are all good. I have recently got to xopera. For my project, I need to deploy a service.yaml on multiple servers. I don't have access to Azure, AWS or GCP because I live in Iran. I have access servers and I had set up the servers with ssh keys. Now I want to deploy the service. yaml to these servers but I couldn't find a single clue how to do that on internet. I hope you guys can help me with this. these are the yaml files.

---
tosca_definitions_version: tosca_simple_yaml_1_3

node_types:
  radon.nodes.deploy:
    derived_from: tosca.nodes.SoftwareComponent
    properties:
      vms:
        type: list
        description: Azure VM types
      resourceGroup:
        type: string
        description: name of resource group
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        inputs:
          vms: {default: { get_property: [SELF, vms] }, type: list }
          resourceGroup: {default: { get_property: [SELF, resourceGroup] }, type: string }
        operations:
          create: 
            implementation: 
              primary: playbooks/deploy.yaml
              dependencies:
                - id_rsa.pub

topology_template:
  inputs:
    vms:
      type: list
    resourceGroup:
      type: string

  node_templates:
    deploy_0:
      type: radon.nodes.deploy
      properties:
        vms: { get_input: vms }
        resourceGroup: { get_input: resourceGroup }
...

and inputs.yaml:

---
resourceGroup: COSCO
vms: 
  - ['Standard_B2s', 'uksouth']
  - ['Standard_B2s', 'uksouth']
  - ['Standard_B2s', 'uksouth']
  - ['Standard_B2s', 'uksouth']
  - ['Standard_B4ms', 'uksouth']
  - ['Standard_B4ms', 'uksouth']
  - ['Standard_B4ms', 'eastus']
  - ['Standard_B4ms', 'eastus']
  - ['Standard_B8ms', 'eastus']
  - ['Standard_B8ms', 'eastus']
...

I use this line of command that the framework suggest to use but it is supposed that you run "az login" command before this opera command. But as I said above my servers are not on Azure. opera deploy service.yaml -i inputs.yaml If I run this command without az login the output is like this (myvenv) erfan@erfan-ZenBook-UX535LI-UX535LI:~/Project/COSCO/deploy$ opera deploy service.yaml -i inputs.yaml service.yaml:36:7: [NodeTemplate] Missing requirements: host.

atsag commented 1 year ago

Hello Mohammad. I am not affiliated to the project, but as I saw your issue, it seems that you are using a TOSCA template that defines resources on Azure (which will not work, as you said that you do not have access to Azure). Moreover, you are trying to deploy on some servers - does this mean that you have ssh access to them? Or are they using Openstack and you have access to Openstack itself as an administrator? In the first case you might want to look into using Docker and Kubernetes with xOpera, in the second case I am not sure that xOpera can support Openstack deployments at all (see issue with deploying basic Openstack example). Please consult the documentation as well: https://xlab-si.github.io/xopera-docs/07-examples.html#examples However, I will take the opportunity to inform you, that this project is perhaps not actively or continuously developed - as no new commits have been made for 5 months...