Comments (5)
I ran a test of doctl compute droplet create
with the --user-data-file
with success. Curious if there is any clues in /var/log/cloud-init-output.log
?
from doctl.
This is a feature I see used a bunch in doctl
. Curious to what the first line of the file pointed to by --user-data-file
looks like.
from doctl.
Sure thing, this is the entire script, except for the IP addresses :)
#!/bin/sh
for X in 1.2.3.4 2.3.4.5 do ; ufw allow from $X to any proto tcp port 22 ; done
sed -r -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashrc
echo '' >> /root/.bashrc
echo '# Force prompt in other colors for root' >> /root/.bashrc
echo "PS1='\${debian_chroot:+(\$debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> /root/.bashrc
All it does is open SSH for a couple of IPs, enable color prompts for all users created later, and a specific colored prompt for root, not a big secret :)
from doctl.
@bryanl argh! sorry for the inconvenience man :( it seems there actually was an error in my stupid script
/var/log/cloud-init-output-log:
Cloud-init v. 0.7.5 running 'modules:final' at Tue, 19 Jul 2016 18:51:24 +0000. Up 21.83 seconds.
/var/lib/cloud/instance/scripts/part-001: 2: /var/lib/cloud/instance/scripts/part-001: Syntax error: word unexpected (expecting "do")
2016-07-19 14:51:24,487 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [2]
2016-07-19 14:51:24,490 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2016-07-19 14:51:24,491 - util.py[WARNING]: Running scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_scripts_user.pyc'>) failed
Cloud-init v. 0.7.5 finished at Tue, 19 Jul 2016 18:51:24 +0000. Datasource DataSourceDigitalOcean. Up 22.04 seconds
The line in my script should have been
for X in 1.2.3.4 2.3.4.5 ; do ufw allow from $X to any proto tcp port 22 ; done
the difference being placement of the semicolon and do
Hopefully i'll remember to check that log file :)
from doctl.
No problem. Sometimes the details are the killer!
from doctl.
Related Issues (20)
- doctl auth init -t TOKEN should not print token to stdout HOT 2
- Provide the tool as an AppImage
- Unable to delete tags from bash variable HOT 2
- Autocompletion for Fish Shell is unclear HOT 3
- Add Support for Alerts for Uptime Checks HOT 9
- Replace deprecated `set-output` command with environment file
- compute image create --image-file HOT 1
- Not Possible to See CName Domain Record Tags from the CLI with Doctl?
- 403 response on cluster kubeconfig save from the pipeline in Gitlab HOT 2
- `doctl auth init` connection refused
- Ability to validate App Spec Schema in Offline Mode
- Get deployment status via doctl HOT 3
- Ability to deploy separate parts of an App
- doctl registry garbage-collection start --force moves the registry to RO mode but don't run garbage collector
- webgui xterm code HOT 1
- Serverless triggers are not being deployed HOT 4
- Why do we have to SSH into a droplet, and then install the Droplet Agent? Why can't you just pre-install it? HOT 3
- Adding taints has wrong syntax in DO docs HOT 2
- Access the link to download CA certificate for managed databases HOT 1
- Incremental builds don't work with --remote-build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctl.