Commit ce310af3d553f5e12a6deb11069767e79cf52b68

Authored by Georg Hopp
1 parent 514f5e11

Move all example boxes in a common directory

  1 +# Vagrant LXD Example Boxe
  2 +
  3 +## Vagrant box format
  4 +
  5 +Vagrant providers each require a custom provider-specific box format.
  6 +Here are some examples of boxes for the `lxd` provider.
  7 +
  8 +## The `lxd` box format
  9 +
  10 +The `lxd` provider right now just uses the default lxd images provided
  11 +by the lxd images: remote. Upon start these will be provisioned with an
  12 +vagrant ssh user and the unsafe common pubkey of vagrant and
  13 +sshd will be enabled. All the necessary commands are defined in the
  14 +metadata.json file.
  15 +
  16 +## Bootstraped provisioners
  17 +
  18 +The boxes here are prepared to run with the ansible provisioner.
  1 +{
  2 + "name": "centos/7",
  3 + "description": "The latest centos/7 LXD image.",
  4 + "versions": [
  5 + {
  6 + "version": "0.0.1",
  7 + "providers": [
  8 + {
  9 + "name": "lxd",
  10 + "url": "file:///home/hopp/projects/vagrant/test/centos_001_lxd.box",
  11 + "checksum_type": "sha1",
  12 + "checksum": "52c6717974bc76ecb9591e55d30baf90be9c68e4"
  13 + }
  14 + ]
  15 + }
  16 + ]
  17 +}
No preview for this file type
@@ -10,7 +10,5 @@ $ tar cvzf lxd.box ./metadata.json ./vagrant.pub @@ -10,7 +10,5 @@ $ tar cvzf lxd.box ./metadata.json ./vagrant.pub
10 10
11 The `lxd` provider right now just uses the default lxd images provided 11 The `lxd` provider right now just uses the default lxd images provided
12 by the lxd images: remote. Upon start these will be provisioned with an 12 by the lxd images: remote. Upon start these will be provisioned with an
13 -vagrant ssh user and and the unsafe common pubkey of vagrant and 13 +vagrant ssh user and the unsafe common pubkey of vagrant and
14 sshd will be enabled. 14 sshd will be enabled.
15 -  
16 -Well, at least thats the idea for now.  
  1 +{
  2 + "provider": "lxd",
  3 + "bootstrap": {
  4 + "hostname": {
  5 + "exec": [
  6 + ["sed", "-i", "s/<%= container %>/<%= hostname %>/", "/etc/hostname"],
  7 + ["sed", "-i", "s/<%= container %>/<%= hostname %>/", "/etc/hosts"]
  8 + ]
  9 + },
  10 + "packages": {
  11 + "exec": [
  12 + ["yum", "install", "-y", "sudo"],
  13 + ["yum", "install", "-y", "openssh-server"]
  14 + ]
  15 + },
  16 + "sudo": {
  17 + "exec": [
  18 + [
  19 + "sed",
  20 + "-i",
  21 + "/vagrant/b;$a\\\nvagrant ALL=(ALL) NOPASSWD: ALL\\\nDefaults:vagrant !requiretty",
  22 + "/etc/sudoers"
  23 + ]
  24 + ]
  25 + },
  26 + "sshd_service": {
  27 + "exec": [
  28 + ["systemctl", "enable", "sshd"],
  29 + ["systemctl", "start", "sshd"]
  30 + ]
  31 + }
  32 + }
  33 +}
No preview for this file type
@@ -10,7 +10,5 @@ $ tar cvzf lxd.box ./metadata.json ./vagrant.pub @@ -10,7 +10,5 @@ $ tar cvzf lxd.box ./metadata.json ./vagrant.pub
10 10
11 The `lxd` provider right now just uses the default lxd images provided 11 The `lxd` provider right now just uses the default lxd images provided
12 by the lxd images: remote. Upon start these will be provisioned with an 12 by the lxd images: remote. Upon start these will be provisioned with an
13 -vagrant ssh user and and the unsafe common pubkey of vagrant and 13 +vagrant ssh user and the unsafe common pubkey of vagrant and
14 sshd will be enabled. 14 sshd will be enabled.
15 -  
16 -Well, at least thats the idea for now.  
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 [ 19 [
20 "sed", 20 "sed",
21 "-i", 21 "-i",
22 - "/vagrant/b;$a\\\nvagrant ALL=(ALL) NOPASSWD: ALL", 22 + "/vagrant/b;$a\\\nvagrant ALL=(ALL) NOPASSWD: ALL\\\nDefaults:vagrant !requiretty",
23 "/etc/sudoers" 23 "/etc/sudoers"
24 ] 24 ]
25 ] 25 ]
1 { 1 {
2 - "name": "lxd/debian/sid", 2 + "name": "debian/sid",
3 "description": "The latest debian/sid LXD image.", 3 "description": "The latest debian/sid LXD image.",
4 "versions": [ 4 "versions": [
5 { 5 {
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 "providers": [ 7 "providers": [
8 { 8 {
9 "name": "lxd", 9 "name": "lxd",
10 - "url": "file:///home/hopp/projects/vagrant/vagrant-lxd/sid_001_lxd.box", 10 + "url": "file:///home/hopp/projects/vagrant/test/sid_001_lxd.box",
11 "checksum_type": "sha1", 11 "checksum_type": "sha1",
12 "checksum": "21d7376327acdb7f36aa25ed89039248c6562415" 12 "checksum": "21d7376327acdb7f36aa25ed89039248c6562415"
13 } 13 }
No preview for this file type
  1 +# Vagrant LXD Example Box
  2 +
  3 +Vagrant providers each require a custom provider-specific box format.
  4 +This folder shows the example contents of a box for the `lxd` provider.
  5 +To turn this into a box:
  6 +
  7 +```
  8 +$ tar cvzf lxd.box ./metadata.json ./vagrant.pub
  9 +```
  10 +
  11 +The `lxd` provider right now just uses the default lxd images provided
  12 +by the lxd images: remote. Upon start these will be provisioned with an
  13 +vagrant ssh user and the unsafe common pubkey of vagrant and
  14 +sshd will be enabled.
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 [ 19 [
20 "sed", 20 "sed",
21 "-i", 21 "-i",
22 - "/vagrant/b;$a\\\nvagrant ALL=(ALL) NOPASSWD: ALL", 22 + "/vagrant/b;$a\\\nvagrant ALL=(ALL) NOPASSWD: ALL\\\nDefaults:vagrant !requiretty",
23 "/etc/sudoers" 23 "/etc/sudoers"
24 ] 24 ]
25 ] 25 ]
  1 +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
No preview for this file type
No preview for this file type
Please register or login to post a comment