Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy cloud-init/startup script on instance(without public/floating IP) with salt-cloud for OpenStack provider #44132

Closed
pratik705 opened this issue Oct 16, 2017 · 6 comments
Labels
Question The issue is more of a question rather than a bug or a feature request stale
Milestone

Comments

@pratik705
Copy link
Contributor

Description of Issue/Question

I am trying to deploy instance on Open Stack provider without public/floating IP. As per my understanding, the "script" parameter[1] from the "profile" use ssh to copy the script to the instance. But, in my scenario, the instance doesn't have public IP and the salt-master is running in the different network. Hence, there should be some way to pass startup script to configure salt-minion on the openstack instance(minion).

Is it possible to pass "cloud-init/startup" script which will execute when the instance(without Public IP) is spawned by salt-cloud? Or is there any possible solution to run the script on instance considering this scenario?

[1] https://docs.saltstack.com/en/latest/topics/cloud/misc.html#deploy-script-arguments

Setup

  • configure salt-cloud with openstack backend.
  • try to deploy instance without public/floating IP

Versions Report

salt --versions-report

Salt Version:
Salt: 2017.7.2

Dependency Versions:
cffi: 1.11.1
cherrypy: unknown
dateutil: 2.6.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.9.6
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: 2.18
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, Aug 4 2017, 00:39:18)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: centos 7.4.1708 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-693.el7.x86_64
system: Linux
version: CentOS Linux 7.4.1708 Core

@garethgreenaway garethgreenaway added this to the Approved milestone Oct 17, 2017
@garethgreenaway garethgreenaway added the Question The issue is more of a question rather than a bug or a feature request label Oct 17, 2017
@garethgreenaway
Copy link
Contributor

@gtmanfred Thoughts on this one?

@gtmanfred
Copy link
Contributor

Script is by default salt-bootstrap.

If you want to use cloud-init, then specify a userdata_file https://docs.saltstack.com/en/latest/topics/cloud/openstack.html#userdata-file

@pratik705
Copy link
Contributor Author

Thanks for reply @garethgreenaway @gtmanfred .

I will test this tomorrow and update the issue.

@gtmanfred
Copy link
Contributor

gtmanfred commented Oct 18, 2017 via email

@pratik705
Copy link
Contributor Author

@gtmanfred thanks. "userdata_file " did the trick.

@stale
Copy link

stale bot commented Feb 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Feb 13, 2019
@stale stale bot closed this as completed Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question The issue is more of a question rather than a bug or a feature request stale
Projects
None yet
Development

No branches or pull requests

3 participants