Add additional packages and config for container

This commit is contained in:
Dmitry Shulyak 2015-11-11 20:37:29 +02:00
parent fa03f07380
commit 5de8818efb
7 changed files with 12 additions and 5 deletions

View File

@ -23,5 +23,8 @@ RUN ansible-playbook -v -i "localhost," -c local /celery.yaml --tags install
RUN pip install riak peewee
RUN pip install -U setuptools>=17.1
RUN pip install -U python-fuelclient
RUN apt-get install -y puppet
RUN gem install hiera
RUN mkdir -p /etc/puppet/hieradata/
CMD ["/run.sh"]

View File

@ -21,7 +21,8 @@ solar:
# docker run --name solar -d -v /root/solar/solar:/solar -v /root/solar/solard:/solard -v /root/solar/templates:/vagrant/templates \
# -v /root/solar/resources:/vagrant/resources -v /root/solar/f2s:/vagrant/f2s \
# -v /var/lib/fuel:/var/lib/fuel -v /root/.config/fuel/fuel_client.yaml:/root/.config/fuel/fuel_client.yaml \
# -v /var/lib/fuel:/var/lib/fuel -v /root/.config/fuel/fuel_client.yaml:/etc/fuel/client/config.yaml -v /etc/puppet/modules:/etc/puppet/modules \
# -v /root/.ssh:/root/.ssh \
# --link=riak:riak --link=redis:redis --name solar solarproject/solar-celery:f2s
riak:

View File

@ -10,4 +10,4 @@ ARGS = json.loads(sys.stdin.read())
env = Environment(ARGS['env'])
facts = env.get_default_facts('deployment', [ARGS['uid']])
sys.stdout.write(json.dumps(facts))
sys.stdout.write(json.dumps(facts[0]))

View File

@ -1,8 +1,8 @@
notice('MODULAR: globals.pp')
$service_token_off = false
$globals_yaml_file = "/etc/puppet/${uid}globals.yaml"
$identity = hiera('uid')
$globals_yaml_file = "/etc/puppet/${identity}globals.yaml"
# remove cached globals values before anything else
remove_file($globals_yaml_file)

View File

@ -47,6 +47,7 @@ def collect_results():
def main():
prepare_hiera()
run_command()
rst = collect_results()
sys.stdout.write(json.dumps(rst))

View File

@ -4,9 +4,11 @@ resources:
from: resources/transport_ssh
values:
ssh_user: 'root'
ssh_key: '/root/.ssh/id_rsa'
- id: transports{{index}}
from: resources/transports
values:
transports:key: ssh_transport{{index}}::ssh_key
transports:user: ssh_transport{{index}}::ssh_user
transports:port: ssh_transport{{index}}::ssh_port
transports:name: ssh_transport{{index}}::name

2
run.sh
View File

@ -6,6 +6,6 @@ if [ -d /solar ]; then
fi
#used only to start celery on docker
ansible-playbook -v -i "localhost," -c local /celery.yaml --skip-tags slave
ansible-playbook -v -i "localhost," -c local /celery.yaml --skip-tags slave,stop
tail -f /var/run/celery/*.log