#!/usr/bin/env python
# -*- coding: utf-8 -*-

PRIMARY_OS = 'CENTOS-7.0'
CS_ENGINE = '''#!/bin/sh
#
FQDN="{fqdn}"

export DEBIAN_FRONTEND=noninteractive

# locale
sudo locale-gen en_US.UTF-8

# /etc/hostname - /etc/hosts
sed -i "1 c\\127.0.0.1 $FQDN localhost" /etc/hosts
echo $FQDN > /etc/hostname
service hostname restart
sleep 5

yum -y clean all
yum -y upgrade

{dinfo}
reboot
'''

OS_ENGINE = '''#!/bin/sh
#
FQDN="{fqdn}"

export DEBIAN_FRONTEND=noninteractive

# locale
sudo locale-gen en_US.UTF-8

# /etc/hostname - /etc/hosts
sed -i "1 c\\127.0.0.1 $FQDN localhost" /etc/hosts
echo $FQDN > /etc/hostname
service hostname restart
sleep 5

yum -y clean all
yum -y upgrade
curl -sSL https://get.docker.com/ | sh
usermod -aG docker centos

chkconfig docker on

{dinfo}
reboot
'''

def pre_process():
    """Executed before launching instances in AWS"""
    pass

def post_process():
    """Executed after launching instances in AWS"""
    pass


# Notes
'''
Script requires:
    {fqdn}
    {dinfo}
'''

Add CentOS config for acp-workshop
Add CentOS config for acp-workshop

Signed-off-by: Jerry Baker <aaf88dc49a82ab24b325ac267fdcf59a36abcb76@docker.com>
