Creating a Compute Instance Group Environment
Create a reference to an instance group environment.
Prerequisites
The prerequisites to create an instance group environment are as follows:
- Create a compute instance.
If you are creating an instance through a private network, then Network Address Translation (NAT) gateway must be set up. For more information, see NAT Gateway.
Note
DevOps only supports instance group deployments to Oracle Linux and CentOS. - If any of your commands in the instance group deployment configuration artifact require
sudo privileges, then you have to grant
ocarun
user with sudo privileges. Follow these steps:- Follow the steps for creating an instance.
- To configure advanced settings, click Show Advanced Options.
- For Initialization Script, enter the following cloud-init script to grant the
sudo privilege:
#cloud-config users: - default - name: ocarun sudo: ALL=(ALL) NOPASSWD:ALL
- When you finish configuring the instance, click Create.
For more information, see Running Commands on an Instance.
For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.
A reference to the selected instance group environment is created. You can create a deployment pipeline to deploy artifacts to instance groups.
To create a reference to an instance group environment, run the
create-compute-instance-environment
command:oci devops deploy-environment create-compute-instance-environment
Required parameters for the
create-compute-instance-environment
command:--compute-instance-group-selectors
--project-id
To get all the commands for
deploy-environment
:oci devops deploy-environment -h
To get help for the
create-compute-instance-environment
command:oci devops deploy-environment create-compute-instance-environment -h
To create a reference to an instance group environment, use the
CreateDeployEnvironment
operation. For thedeployEnvironmentType
attribute, specify theCOMPUTE_INSTANCE_GROUP
value.