mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Merge pull request #110 from JamesBromberger/python
Fixes to get Debian official images running.
This commit is contained in:
commit
ad79cf8a09
5 changed files with 65 additions and 40 deletions
50
manifests/ec2-ebs-debian-official-i386-pvm.manifest.json
Normal file
50
manifests/ec2-ebs-debian-official-i386-pvm.manifest.json
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"provider": "ec2",
|
||||
"virtualization": "pvm",
|
||||
"credentials": {
|
||||
// "access-key": null,
|
||||
// "secret-key": null
|
||||
},
|
||||
|
||||
"bootstrapper": {
|
||||
"workspace": "/target"
|
||||
},
|
||||
"image": {
|
||||
"name": "debian-{release}-{architecture}-{virtualization}-{%y}{%m}{%d}",
|
||||
"description": "Debian {release} {architecture} AMI ({virtualization})"
|
||||
},
|
||||
"system": {
|
||||
"release": "wheezy",
|
||||
"architecture": "i386",
|
||||
"timezone": "UTC",
|
||||
"locale": "en_US",
|
||||
"charmap": "UTF-8"
|
||||
},
|
||||
"volume": {
|
||||
"backing": "ebs",
|
||||
"partitions": {
|
||||
"type": "none",
|
||||
"root": {
|
||||
"size": 8192,
|
||||
"filesystem": "ext4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
"backports": {
|
||||
"enabled": true,
|
||||
"packages": [ "cloud-init" ]
|
||||
},
|
||||
"user_packages": {
|
||||
"enabled": true,
|
||||
"repo": [ "sudo" ],
|
||||
"local": []
|
||||
},
|
||||
"sed": {
|
||||
"enabled": true,
|
||||
"file": "etc/cloud/cloud.cfg",
|
||||
"find": "^ name: debian$",
|
||||
"replace": " name: admin\n sudo: ALL=(ALL) NOPASSWD:ALL\n shell: /bin/bash"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -25,15 +25,26 @@
|
|||
"partitions": {
|
||||
"type": "none",
|
||||
"root": {
|
||||
"size": 1024,
|
||||
"size": 8192,
|
||||
"filesystem": "ext4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
"admin_user": {
|
||||
"backports": {
|
||||
"enabled": true,
|
||||
"username": "admin"
|
||||
"packages": [ "cloud-init" ]
|
||||
},
|
||||
"user_packages": {
|
||||
"enabled": true,
|
||||
"repo": [ "sudo" ],
|
||||
"local": []
|
||||
},
|
||||
"sed": {
|
||||
"enabled": true,
|
||||
"file": "etc/cloud/cloud.cfg",
|
||||
"find": "^ name: debian$",
|
||||
"replace": " name: admin\n sudo: ALL=(ALL) NOPASSWD:ALL\n shell: /bin/bash"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
def tasks(tasklist, manifest):
|
||||
import tasks
|
||||
tasklist.add(tasks.DoSeds())
|
||||
|
||||
tasklist.add(tasks.DoSeds)
|
||||
|
||||
def validate_manifest(data, schema_validate):
|
||||
from os import path
|
||||
|
|
|
@ -12,8 +12,4 @@ class DoSeds(Task):
|
|||
def run(self, info):
|
||||
|
||||
chroot_path = os.path.join(info.root, info.manifest.plugins['sed']['file'])
|
||||
print chroot_path
|
||||
print info.manifest.plugins['sed']['file']
|
||||
print info.manifest.plugins['sed']['find']
|
||||
print info.manifest.plugins['sed']['replace']
|
||||
sed_i(chroot_path, info.manifest.plugins['sed']['find'], info.manifest.plugins['sed']['replace'])
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "Backports setup and package install",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"plugins": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sed": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file": {
|
||||
"type": "string"
|
||||
},
|
||||
"find": {
|
||||
"type": "string"
|
||||
},
|
||||
"replace": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["sed"]
|
||||
}
|
||||
},
|
||||
"required": ["plugins"]
|
||||
}
|
Loading…
Add table
Reference in a new issue