Ask Your Question
0

how to install the rpm from controller to instance using heat

asked 2018-10-25 04:44:04 -0600

priyotoshtsp gravatar image

I have one rpm. I want to install from controller to an instance using HEAT. After that the executable present in rpm should start automatically. How to go ahead to solve this problem????

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2018-11-03 10:07:04 -0600

To copy the file to the instance, you could use cloud-init module write-files and include the base64-encoded rpm file. Put the cloud-init definition in a separate file and use Heat’s CloudConfig resource and the get_file function.

Or you create a repo on the controller or elsewhere that includes the rpm and use cloud-init to install the package from the repo.

To launch the executable, a shell script in a Heat SoftwareConfig resource does the trick.

You then need to put the CloudConfig and SoftwareConfig resources into a MultipartMime resource , which you reference in the user_data property of the server definition.

edit flag offensive delete link more
0

answered 2018-11-03 07:43:17 -0600

updated 2018-11-15 01:44:24 -0600

you can install rpm from controller to an instance using, including shell script within in the heat template like below mentioned.

   resources:
      the_server:
        type: OS::Nova::Server
        properties:
          # flavor, image etc
          user_data: |
            #!/bin/bash
            echo "Running boot script"
            # ..

For more information about this, refer this link https://docs.openstack.org/heat/lates...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2018-10-25 04:44:04 -0600

Seen: 16 times

Last updated: Nov 15