We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

cloud-init in compute creation

Accepted answer
13
Views
6
Comments
edited Apr 14, 2020 9:03PM in Oracle Cloud Infrastructure - General 6 comments

Summary

using cloud-init option for post processing

Content

Has anyone had success with using cloud-init (under Advanced option on the compute creation page) during recent days?

I am trying to launch Apache with a default page post creation of an instance. cloud-init script is pasted below.

The compute creation seems to be ignoring the cloud-init script and there doesn't seem to be any logging to check error conditions.

cloud-init script:

===========

#!/bin/bash
sudo yum install httpd -y
sudo apachectl start
sudo systemctl enable httpd
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --reload
sudo bash -c 'echo "HTTP server on : " `hostname` > /var/www/html/index.html'

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!