Step 4: Create a Simple Service
  • 20 Dec 2024
  • Dark
    Light
  • PDF

Step 4: Create a Simple Service

  • Dark
    Light
  • PDF

Article summary

Objective: Publish an existing script as a service in Itential Cloud.
Time required: 2 minutes

Prerequisites

You will need the following to complete this guide:

  • An IAG5 server that is successfully connected to Itential Cloud
  • Have at least 1 Git repository connected to IAG5 with scripts in it
  • Be logged in to IAG5

1. Create a Simple Service (Simple = No Parameters)

In this example, we will publish simple scripts as a service in Itential Cloud. The scripts we will use are available in the public repository https://github.com/torerodev/example-scripts (which you connected to IAG5 in the previous guide, "Connecting a Git Repository to IAG5"). Each of these scripts can be run with no runtime parameters or inputs.

Create a service based on a Python script:

iagctl create service python-script my-python-service \
--repository example-scripts-repo \
--filename hello-torero.py  \
--description "Python Script Example" 


Create a service based on a Ansible playbook:

iagctl create service ansible-playbook my-ansible-service \
--repository example-scripts-repo \
--playbook hello-ansible.yml \
--description "Ansible Playbook Example" 


Create a service based on an OpenTofu plan:

iagctl create service opentofu-plan my-opentofu-service \
--repository example-scripts-repo \
--working-dir hello-plan \
--description "OpenTofu Plan Example"



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.