kameleon-builder 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,111 +0,0 @@
1
- #==============================================================================
2
- # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
- #==============================================================================
4
- #
5
- # DESCRIPTION: Build a debian wheezy appliance using Docker.
6
- #
7
- #==============================================================================
8
-
9
- ---
10
- # Loads some helpful aliases
11
- aliases: defaults.yaml
12
- # Enables qcow2 checkpoint
13
- checkpoint: docker.yaml
14
- #== Global variables use by Kameleon engine and the steps
15
- global:
16
- ## User varibales : used by the recipe
17
- cachedir: /var/cache/kameleon
18
- user_name: kameleon
19
- arch: amd64
20
-
21
- distrib: debian
22
- release: wheezy
23
- docker_image: kameleon-$${distrib}-$$release
24
- # DNS servers : opendns
25
- docker_dns: 208.67.222.222
26
-
27
- ## System variables. Required by kameleon engine
28
- # Include specific steps
29
- include_steps:
30
- - $$distrib/$$release
31
- - $$distrib
32
-
33
- # Shell session from where we launch exec_out commands. There is often a
34
- # local bash session, but it can be a remote shell on other machines or on
35
- # any shell. (eg. bash, chroot, fakechroot, ssh, tmux, lxc...)
36
- out_context:
37
- cmd: bash
38
- workdir: $$kameleon_cwd
39
-
40
- # Shell session that allows us to connect to the building machine in order to
41
- # configure it and setup additional programs
42
- ssh_options: -o StrictHostKeyChecking=no -o ForwardAgent=yes
43
- ssh_port: $(cat MAIN_CONTAINER_PORT)
44
- insecure_ssh_key: insecure_ssh_dsa_key
45
- in_context:
46
- cmd: LC_ALL=POSIX ssh $$ssh_options root@localhost -p $$ssh_port -i $$insecure_ssh_key -t /bin/bash
47
- workdir: /
48
-
49
- #== Bootstrap the new system and create the 'in_context'
50
- bootstrap:
51
- - debootstrap:
52
- - release: $$release
53
- - arch: $$arch
54
- - repository: http://ftp.debian.org/debian/
55
- - rootfs_archive: $$cachedir/$$distrib/$$release/$$arch/debootstrap.tar.gz
56
- - prepare_docker:
57
- - image: $$docker_image
58
- - dns: $$docker_dns
59
- - rootfs_archive: $$cachedir/$$distrib/$$release/$$arch/debootstrap.tar.gz
60
- - start_docker:
61
- - image: $$docker_image
62
- - dns: $$docker_dns
63
- - hostname: kameleon-$$distrib
64
-
65
- #== Install and configuration steps
66
- # WARNING: this part should be independante from the build context (whenever
67
- # possible...)
68
- setup:
69
- # Install
70
- - software_install:
71
- - packages: >
72
- debian-keyring ntp zip unzip rsync sudo less vim bash-completion
73
- - config_kernel
74
- # Configuration
75
- - system_config:
76
- - locales: fr_FR en_US
77
- - lang: fr_FR.UTF-8
78
- - timezone: UTC
79
- - keyboard_config:
80
- - layout: "fr,us"
81
- - create_user:
82
- - name: $$user_name
83
- - group: admin
84
- - password: $$user_name
85
-
86
- #== Export the generated appliance in the format of your choice
87
- export:
88
- - export_docker_image:
89
- - image: $(cat MAIN_CONTAINER_ID)
90
- - rootfs_archive: "$${kameleon_recipe_name}.tar.gz"
91
- - create_disk_nbd:
92
- - consider_checkpoint: false
93
- - image_size: 2G
94
- - filename: "$${kameleon_recipe_name}.qcow2"
95
- - device: /dev/nbd1
96
- - populate_disk:
97
- - filename: "$${kameleon_recipe_name}.qcow2"
98
- - device: /dev/nbd1
99
- - mountdir: rootfs
100
- - filesystem_type: ext4
101
- - rootfs_archive: "$${kameleon_recipe_name}.tar.gz"
102
- - start_chroot:
103
- - rootfs: rootfs
104
- - dns: $$docker_dns
105
- - mount_chroot
106
- - install_bootloader:
107
- - mountdir: rootfs
108
- - device: /dev/nbd1
109
- - compact_qcow_img:
110
- - mountdir: rootfs
111
- - filename: "$${kameleon_recipe_name}.qcow2"