How to run cloud-config script manually?
Hello!
Does cloud-init have a mode to run cloud-config data manually?
To better describe the scenario, I'm working with cloud servers that have been pre-configured (OS/network/
1. Upload cloud-init 0.7.7 to /opt/cloud-init/
2. Upload my cloud-config script to /root/provision.txt
3. Run /opt/cloud-
I'd like to avoid the deep OS integration with cloud-init, if possible.
Thanks for reading.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- 2016-08-29
- Last reply:
- 2016-09-07
Scott Moser (smoser) said : | #1 |
Generally speaking, cloud-init has 4 stages:
a.) cloud-init local
command: cloud-init init --local
search for local datasources (config drive or NoCloud).
this writes networking configuration either that it found from the datasource or "fallback" networking config.
b.) cloud-init network
command: cloud-init init
search for data sources that require network
c.) cloud-init config
command: cloud-init modules --mode=config
d.) cloud-init final
command: cloud-init modules --mode=final
you can run those one after another, and probably come out with much of what you want, but networking is not likely to be brought up. cloud-init does not attempt to manually bring up networking, rather it writes configuration to the system and lets normal boot process bring the network up.
Can you help with this problem?
Provide an answer of your own, or ask Andy for more information if necessary.