Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (63 sloc) 2.21 KB
[ structure.linux-base ]
description = 'Base Linux'
scripts = { 'create' = 'linux-create', 'destroy' = 'linux-destroy' }
[ structure.linux-base.config_values ]
swap_size = 512
vcenter_guest_id = 'other26xLinux64Guest'
virtualbox_guest_type = 'Linux26_64'
root_password_hash = '$6$rootroot$oLo.loyMV45VA7/0sKV5JH/xBAXiq/igL4hQrGz3yd9XUavmC82tZm1lxW2N.5eLxQUlqp53wXKRzifZApP0/1'
'azure_admin_username:Azure' = 'CTRAdmin'
'azure_admin_password:Azure' = 'CTRAdmin00'
[ script.linux-create ]
description ='Install Linux'
script = """# pxe boot and install
check_port = 22
if ( foundation.type == 'AWSEC2' ) then
begin( description='Provision AWS EC2' )
# should allready be ready to go and started
end
elif ( foundation.type == 'Azure' ) then
begin( description='Provision Azure' )
# should allready be ready to go and started
end
elif ( foundation.type == 'Docker' ) then
begin( description='Provision Docker' )
check_port = config.docker_check_port
foundation.start()
end
else
begin( description='Provision From Installer' )
if not structure.provisioning_interface then
fatal_error( msg='Provisioning Interface Not Defined' )
dhcp.set_pxe( interface=structure.provisioning_interface, pxe=config.installer_pxe )
foundation.power_on()
delay( seconds=300 )
foundation.wait_for_poweroff()
dhcp.set_pxe( interface=structure.provisioning_interface, pxe='normal-boot' )
foundation.power_on()
end
if check_port then
begin( description='Verify Running' )
iputils.wait_for_port( target=structure.provisioning_ip, port=check_port )
end"""
[ script.linux-destroy ]
description ='Uninstall Linux'
script = """# foundation cleanup should wipe/destroy the disks
if ( foundation.type == 'AWSEC2' ) then
begin( description='Stop AWS EC2' )
# foundation will kill it
end
elif ( foundation.type == 'Docker' ) then
begin( description='Stop Docker' )
foundation.stop()
end
else
begin( description='Power Off' )
foundation.power_off()
# Wipe MBR/Disk
end
"""
[ pxe.normal-boot ]
boot_script = """echo Booting form Primary Boot Disk
sanboot --no-describe --drive 0x80 || echo Primary Boot Disk is not Bootable"""
template = '# Normal Boot'
You can’t perform that action at this time.