Skip to content

Commit

Permalink
Store manager version and build time in motd
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Maksymczuk committed Jul 20, 2017
1 parent f3ba1d4 commit 54a5053
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/manager/scripts/create.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python

import os
from datetime import datetime
from os.path import join, dirname

from cloudify import ctx
Expand Down Expand Up @@ -147,5 +148,15 @@ def restore_agent_resources(agents_dir):
)


def store_manager_version():
version = os.environ.get('MANAGER_VERSION', '')
build_date = datetime.now().strftime('%Y-%m-%d %H:%M')
motd = ' '.join(['Cloudify Manager', version,
'(bootstrap {0})\n'.format(build_date)])
with open('/etc/motd', 'a') as f:
f.write(motd)


execute_before_bootstrap()
deploy_manager_sources()
store_manager_version()

0 comments on commit 54a5053

Please sign in to comment.