Revision 1d8cf97d
b/snf-deploy/fabfile.py | ||
---|---|---|
461 | 461 |
} |
462 | 462 |
custom = customize_settings_from_tmpl(tmpl, replace) |
463 | 463 |
put(custom, tmpl, mode=0644) |
464 |
with settings(host_string=env.env.db.hostname):
|
|
464 |
with settings(host_string=env.env.db.ip):
|
|
465 | 465 |
host_info = env.env.ips_info[env.host] |
466 | 466 |
allow_access_in_db(host_info.ip) |
467 | 467 |
try_run("/etc/init.d/gunicorn restart") |
... | ... | |
536 | 536 |
snf-manage user-add {0} {1} {2} |
537 | 537 |
""".format(email, name, lastname) |
538 | 538 |
try_run(cmd) |
539 |
with settings(host_string=env.env.db.hostname):
|
|
539 |
with settings(host_string=env.env.db.ip):
|
|
540 | 540 |
uid, user_auth_token, user_uuid = get_auth_token_from_db(email) |
541 | 541 |
cmd = """ |
542 | 542 |
snf-manage user-modify --password {0} {1} |
... | ... | |
549 | 549 |
if not user_email: |
550 | 550 |
user_email = env.env.user_email |
551 | 551 |
debug(env.host, " * Activate user %s..." % user_email) |
552 |
with settings(host_string=env.env.db.hostname):
|
|
552 |
with settings(host_string=env.env.db.ip):
|
|
553 | 553 |
uid, user_auth_token, user_uuid = get_auth_token_from_db(user_email) |
554 | 554 |
|
555 | 555 |
cmd = """ |
... | ... | |
703 | 703 |
|
704 | 704 |
@roles("nodes") |
705 | 705 |
def setup_nfs_clients(): |
706 |
if env.host == env.env.pithos.hostname:
|
|
706 |
if env.host == env.env.pithos.ip:
|
|
707 | 707 |
return |
708 | 708 |
|
709 | 709 |
debug(env.host, " * Mounting pithos NFS mount point...") |
... | ... | |
745 | 745 |
setup_apache() |
746 | 746 |
setup_webproject() |
747 | 747 |
|
748 |
with settings(host_string=env.env.accounts.hostname):
|
|
748 |
with settings(host_string=env.env.accounts.ip):
|
|
749 | 749 |
service_id, service_token = get_service_details("pithos") |
750 | 750 |
|
751 | 751 |
install_package("kamaki") |
... | ... | |
1059 | 1059 |
install_package("python-django-south") |
1060 | 1060 |
tmpl = "/etc/synnefo/cyclades.conf" |
1061 | 1061 |
|
1062 |
with settings(host_string=env.env.accounts.hostname):
|
|
1062 |
with settings(host_string=env.env.accounts.ip):
|
|
1063 | 1063 |
service_id, service_token = get_service_details("cyclades") |
1064 | 1064 |
|
1065 | 1065 |
replace = { |
... | ... | |
1165 | 1165 |
try_run("ping -c1 cyclades." + env.env.domain) |
1166 | 1166 |
try_run("ping -c1 pithos." + env.env.domain) |
1167 | 1167 |
|
1168 |
with settings(host_string=env.env.db.hostname):
|
|
1168 |
with settings(host_string=env.env.db.ip):
|
|
1169 | 1169 |
uid, user_auth_token, user_uuid = get_auth_token_from_db(env.env.user_email) |
1170 | 1170 |
|
1171 | 1171 |
install_package("python-progress") |
... | ... | |
1187 | 1187 |
@roles("client") |
1188 | 1188 |
def register_image(image="debian_base.diskdump"): |
1189 | 1189 |
debug(env.host, " * Register image to plankton...") |
1190 |
with settings(host_string=env.env.db.hostname):
|
|
1190 |
with settings(host_string=env.env.db.ip):
|
|
1191 | 1191 |
uid, user_auth_token, user_uuid = get_auth_token_from_db(env.env.user_email) |
1192 | 1192 |
|
1193 | 1193 |
pithos_url = "pithos://{0}/images/{1}".format(user_uuid, image) |
Also available in: Unified diff