Git Product home page Git Product logo

orchent's Introduction

orchent

Build workflow

The Orchestrator Command Line Client

Build from source

Before compiling orchent, make sure to install The Go Programming Language

# Building orchent
git clone https://github.com/indigo-dc/orchent.git
cd orchent
go build -o orchent orchent.go

# Test it
./orchent --version

Install package on Linux

Download the rpm/deb package from here and install it:

# Debian/Ubuntu:
dpkg -i orchent_1.2.7-rc1_amd64.deb 

# CentOS/Fedora
rpm -i orchent-1.2.7-1.el7.x86_64.rpm

Test the installation:

orchent --version

Install orchent binary on MacOS

Download the darwin package from here, rename it (optional) and add executable permissions:

mv orchent-amd64-darwin orchent
chmod +x orchent

Test it:

./orchent --version

Usage

orchent helps you as much as possible:

usage: orchent [<flags>] <command> [<args> ...]

The orchestrator client.



Please either store your access token in 'ORCHENT_TOKEN' or set the account to use with oidc-agent in the 'ORCHENT_AGENT_ACCOUNT' and the socket of the oidc-agent in the 'OIDC_SOCK' environment variable:

  export ORCHENT_TOKEN=<your access token>
          OR
  export OIDC_SOCK=<path to the oidc-agent socket> (usually this is already exported)
  export ORCHENT_AGENT_ACCOUNT=<account to use>

If you need to specify the file containing the trusted root CAs use the 'ORCHENT_CAFILE' environment variable:

  export ORCHENT_CAFILE=<path to file containing trusted CAs>


Flags:
      --help     Show context-sensitive help (also try --help-long and --help-man).
      --version  Show application version.
  -u, --url=URL  the base url of the orchestrator rest interface. Alternative the environment variable 'ORCHENT_URL' can be used: 'export ORCHENT_URL=<the_url>'

Commands:
  help [<command>...]
    Show help.

  depls [<flags>]
    list deployments

  depshow [<flags>] <uuid>
    show a specific deployment

  depcreate [<flags>] <template> <parameter>
    create a new deployment

  depupdate [<flags>] <uuid> <template> <parameter>
    update the given deployment

  deptemplate <uuid>
    show the template of the given deployment

  depdel <uuid>
    delete a given deployment

  depreset [<flags>] <uuid>
    reset the state of a given deployment

  resls <deployment uuid>
    list the resources of a given deployment

  resshow <deployment uuid> <resource uuid>
    show a specific resource of a given deployment

  test
    test if the given url is pointing to an orchestrator, please use this to ensure there is no typo in the url.

  showconf
    list the endpoints used by the current orchestrator.

Before using the orchestrator with orchent you need to export your IAM access token:

export ORCHENT_TOKEN=<your access token here>

As long as the access token is valid orchent can tell the orchestrator what to do. e.g. update a deployment:

export ORCHENT_URL=https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator/
./orchent depupdate eac4dabb-9613-4026-bac7-6075050308e3 template.txt '{"number_cpus": +1, "memory_size": "2 GB"}'
update of deployment eac4dabb-9613-4026-bac7-6075050308e3 successfully triggered

And after that one could e.g. have a look at the deployment:

./orchent depshow eac4dabb-9613-4026-bac7-6075050308e3
Deployment [eac4dabb-9613-4026-bac7-6075050308e3]:
  status: UPDATE_IN_PROGRESS
  creation time: 2016-10-12T07:02+0000
  update time: 2016-10-12T07:13+0000
  callback:
  output: map[]
  links:
    self [http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/eac4dabb-9613-4026-bac7-6075050308e3]
    resources [http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/eac4dabb-9613-4026-bac7-6075050308e3/resources]
    template [http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/eac4dabb-9613-4026-bac7-6075050308e3/template]

For more information and more examples please see the documentation

orchent's People

Contributors

alexcos78 avatar alvarolopez avatar bwegh avatar caifti avatar lgiommi avatar maricaantonacci avatar mkopsnc avatar orviz avatar tzok avatar zachmann avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orchent's Issues

Ouput map is empty

Hi,

I am deploying Galaxy using orchant and when the deploy is complete I do not get the output. As an example, this is orchant output:

marco@sonny:~/Projects/INDIGO/Galaxy/elastic$ orchent --url $ORCH_URL depshow 3c3eefd9-79c4-46ae-bf2f-245fee94c67dDeployment [3c3eefd9-79c4-46ae-bf2f-245fee94c67d]:
  status: CREATE_COMPLETE
  status reason: 
  creation time: 2016-10-27T10:24+0000
  update time: 2016-10-27T10:54+0000
  callback: 
  output: map[]
  links:
    self [http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/3c3eefd9-79c4-46ae-bf2f-245fee94c67d]
    resources [http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/3c3eefd9-79c4-46ae-bf2f-245fee94c67d/resources]
    template [http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/3c3eefd9-79c4-46ae-bf2f-245fee94c67d/template]

And this is from the orchestrator:

marco@sonny:~/Projects/INDIGO/Galaxy/elastic$ curl -H "$FG_AUTH" http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/3c3eefd9-79c4-46ae-bf2f-245fee94c67d|jq '.'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2521    0  2521    0     0  61217      0 --:--:-- --:--:-- --:--:-- 61487
{
  "uuid": "3c3eefd9-79c4-46ae-bf2f-245fee94c67d",
  "creationTime": "2016-10-27T10:24+0000",
  "updateTime": "2016-10-27T10:54+0000",
  "status": "CREATE_COMPLETE",
  "outputs": {
    "galaxy_url": "http://90.147.102.132/galaxy",
    "cluster_creds": {
      "token_type": "private_key",
      "token": "-----BEGIN RSA PRIVATE KEY-----XXXXXXX\n-----END RSA PRIVATE KEY-----\n",
      "user": "cloudadm"
    },
    "cluster_ip": "90.147.102.132"
  },
  "task": "NONE",
  "cloudProviderName": "provider-RECAS-BARI",
  "links": [
    {
      "rel": "self",
      "href": "http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/3c3eefd9-79c4-46ae-bf2f-245fee94c67d"
    },
    {
      "rel": "resources",
      "href": "http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/3c3eefd9-79c4-46ae-bf2f-245fee94c67d/resources"
    },
    {
      "rel": "template",
      "href": "http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator/deployments/3c3eefd9-79c4-46ae-bf2f-245fee94c67d/template"
    }
  ]
}

error updating deployment: EOF

orchent depupdate returns error updating deployment: EOF even if the update is started correctly.

orchent version 1.2.5
orchestrator version 2.2.0

missing makefile

I tried installing it from source as per the documentation. However, it fails without a makefile.

Orchent does not show all details about deployment

When displaying information about deployment, Orchent does not show everything that the Orchestrator passes to it. It misses the task and cloudProviderName informations, which are rather important when debugging own deployments. Below is the output of Orchent and on the bottom a raw output from Orchestrator REST API.

This concerns Orchent 1.0.3.

Deployment [78ecedef-1814-46b0-ac57-efd36d9bf42a]:
  status: CREATE_IN_PROGRESS
  creation time: 2017-04-21T09:43+0000
  update time: 2017-04-21T09:44+0000
  callback: 
  status reason: 
  outputs: 
  {}
  links:
    self [https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator/deployments/78ecedef-1814-46b0-ac57-efd36d9bf42a]
    resources [https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator/deployments/78ecedef-1814-46b0-ac57-efd36d9bf42a/resources]
    template [https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator/deployments/78ecedef-1814-46b0-ac57-efd36d9bf42a/template]
{
  "uuid": "78ecedef-1814-46b0-ac57-efd36d9bf42a",
  "creationTime": "2017-04-21T09:43+0000",
  "updateTime": "2017-04-21T09:44+0000",
  "status": "CREATE_IN_PROGRESS",
  "outputs": {},
  "task": "DEPLOYER",
  "cloudProviderName": "provider-RECAS-BARI",
  "links": [
    {
      "rel": "self",
      "href": "https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator/deployments/78ecedef-1814-46b0-ac57-efd36d9bf42a"
    },
    {
      "rel": "resources",
      "href": "https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator/deployments/78ecedef-1814-46b0-ac57-efd36d9bf42a/resources"
    },
    {
      "rel": "template",
      "href": "https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator/deployments/78ecedef-1814-46b0-ac57-efd36d9bf42a/template"
    }
  ]
}

Orchent on DOCKER with SSL Orchestrator

Hi,

Since the PaaS Orchestrator is transitioning from HTTP to HTTPS I have tried to use Orchent against the HTTPS endpoint (https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator/deployments) but I get the following error:

retrieving deployment list:
error requesting list of providers:
Get https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator/deployments: x509: failed to load system roots and no roots provided

Can Orchent be updated to support this feature (before the Orchestrator team decommissions the non-SSL endpoint? /cc @alberto-brigandi

Way to reproduce this problem:

alias orchent='docker run --rm -e ORCHENT_TOKEN=$ORCHENT_TOKEN -v $PWD:/data marica/orchent:latest --url=https://orchestrator01-indigo.cloud.ba.infn.it/orchestrator'
orchent depls

Expected behaviour:

Obtain the list of deployments.

Not urgent: Simplify the commandline

Hi,

A very simple (and convenient) improvement could be to have the capability of specifying the Orchestrator as an environment variable or even better as an entry in a file. This will simplify the command line structure.

add support for new orchestrator parameters

The following two parameters have been added to control the retry strategy implemented in the Orchestrator for deployment create/update operations:

  • keepLastAttempt (options: true, false). If set to false, in case of failure the resources allocated in the site will be all deleted.
  • maxProvidersRetry. If set to N, in case of failure the deployment will be re-tried in the first N cloud providers.

Compilation problem

Hi Baz,

when I try to compile the cli I get an error:

building orchent ... # command-line-arguments
src/orchent/orchent.go:207: undefined: os.LookupEnv
src/orchent/orchent.go:404: undefined: os.LookupEnv
done

I think a dependency is missed but since this is my first run in go I have no idea how to fix it.

Cheers,
Marco

add local alias support

add option to specify an alias for a deployment
like .ssh/config (which will be only local, but at least usable)

orchent depshow fails

orchent version 1.2.9 for ubuntu 22.04.2 LTS seems to have a bug:
it properly create a deployment:

ubuntu@ocp-ubu-ui:~$ orchent depcreate --user_group developers template.yaml Deployment [11edf4c3-82d4-6189-8bd1-02424e495bee]: status: CREATE_IN_PROGRESS creation time: 2023-05-17T15:00+0000 update time: 2023-05-17T15:00+0000 outputs: {}

but then depshow does not work anymore:

ubuntu@ocp-ubu-ui:~$ orchent depshow 11edf4c3-82d4-6189-8bd1-02424e495bee error requesting deployment 11edf4c3-82d4-6189-8bd1-02424e495bee: Error 'Not Found' [404]: The deployment <11edf4c3-82d4-6189-8bd1-02424e495bee> doesn't exist

Unclear syntax for the TOSCA template

Hi,

I am trying to intantitate a TOSCA template with orchent. The template works when I use directly the REST API through POSTMAN. However, I get syntax errors which are unclear.

Can you add a working example in the documentation?

My template is:

{
imports:
  - indigo_custom_types: https://raw.githubusercontent.com/indigo-dc/tosca-types/master/custom_types.yaml

description: >
  TOSCA template for deploying EUBIOSTEO app.

topology_template:

  inputs:
    number_cpus:
      type: integer
      description: number of cpus required for the instance
      default: 1
    memory_size:
      type: string
      description: ram memory required for the instance
      default: 1 GB

  node_templates:
    eubiosteo:
      type: tosca.nodes.indigo.Eubiosteo
      requirements:
        - host: eubiosteo_server

    eubiosteo_server:
      type: tosca.nodes.indigo.Compute
      capabilities:
        endpoint:
          properties:
            network_name: PUBLIC
            ports:
              http_port:
                protocol: tcp
                source: 22
        # Host container properties
        host:
         properties:
           num_cpus: { get_input: number_cpus }
           mem_size: { get_input: memory_size }
        # Guest Operating System properties
        os:
          properties:
            # host Operating System image properties
            type: linux
            distribution: centos
            version: 7
            image: indigodatacloudapps/eubiosteo

  outputs:
    instance_ip:
      value: { get_attribute: [ eubiosteo_server, public_address, 0 ] }
    instance_creds:
      value: { get_attribute: [ eubiosteo_server, endpoint, credential, 0 ] }
}

My errors are the following:

./orchent -u http://orchestrator01-indigo.cloud.ba.infn.it:8080/orchestrator depcreate template.txt '{ "number_cpus" : 1, "memory_size" : "512 MB" }'
error creating deployment:
Error 'Bad Request' [400]: Template is invalid: Context: while parsing a flow node
Problem: expected the node content, but found BlockEntry
Note: null
Start: SimpleMark(line=3, column=3)
End : SimpleMark(line=3, column=3)
Level: ERROR
Code : INVALID_YAML;

Many thanks!

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.