Step 4: Create a Simple Service
- 20 Dec 2024
-
DarkLight
-
PDF
Step 4: Create a Simple Service
- Updated on 20 Dec 2024
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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?