12 changed files with 116 additions and 26 deletions
-
2gentoo.json
-
BINgentoo_001_lxd.box
-
15gentoo_box/metadata.json
-
9lib/vagrant/lxd/action.rb
-
6lib/vagrant/lxd/action/bootstrap.rb
-
4lib/vagrant/lxd/action/ensure_ssh.rb
-
39lib/vagrant/lxd/driver.rb
-
17sid.json
-
BINsid_001_lxd.box
-
16sid_box/README.md
-
33sid_box/metadata.json
-
1sid_box/vagrant.pub
@ -0,0 +1,17 @@ |
|||||
|
{ |
||||
|
"name": "lxd/debian/sid", |
||||
|
"description": "The latest debian/sid LXD image.", |
||||
|
"versions": [ |
||||
|
{ |
||||
|
"version": "0.0.1", |
||||
|
"providers": [ |
||||
|
{ |
||||
|
"name": "lxd", |
||||
|
"url": "file:///data/ghopp/projects/vagrant/vagrant-lxd/sid_001_lxd.box", |
||||
|
"checksum_type": "sha1", |
||||
|
"checksum": "a533654e7577931659c1cb457b13e6b184d4013d" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
# Vagrant LXD Example Box |
||||
|
|
||||
|
Vagrant providers each require a custom provider-specific box format. |
||||
|
This folder shows the example contents of a box for the `lxd` provider. |
||||
|
To turn this into a box: |
||||
|
|
||||
|
``` |
||||
|
$ tar cvzf lxd.box ./metadata.json ./vagrant.pub |
||||
|
``` |
||||
|
|
||||
|
The `lxd` provider right now just uses the default lxd images provided |
||||
|
by the lxd images: remote. Upon start these will be provisioned with an |
||||
|
vagrant ssh user and and the unsafe common pubkey of vagrant and |
||||
|
sshd will be enabled. |
||||
|
|
||||
|
Well, at least thats the idea for now. |
||||
@ -0,0 +1,33 @@ |
|||||
|
{ |
||||
|
"provider": "lxd", |
||||
|
"bootstrap": { |
||||
|
"hostname": { |
||||
|
"exec": [ |
||||
|
["sed", "-i", "s/<%= container %>/<%= hostname %>/", "/etc/hostname"], |
||||
|
["sed", "-i", "s/<%= container %>/<%= hostname %>/", "/etc/hosts"] |
||||
|
] |
||||
|
}, |
||||
|
"packages": { |
||||
|
"exec": [ |
||||
|
["apt-get", "install", "-y", "sudo"], |
||||
|
["apt-get", "install", "-y", "openssh-server"] |
||||
|
] |
||||
|
}, |
||||
|
"sudo": { |
||||
|
"exec": [ |
||||
|
[ |
||||
|
"sed", |
||||
|
"-i", |
||||
|
"/vagrant/b;$a\\\nvagrant ALL=(ALL) NOPASSWD: ALL", |
||||
|
"/etc/sudoers" |
||||
|
] |
||||
|
] |
||||
|
}, |
||||
|
"sshd_service": { |
||||
|
"exec": [ |
||||
|
["systemctl", "enable", "ssh"], |
||||
|
["systemctl", "start", "ssh"] |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue