Page MenuHomePhabricator

nodepool users should have OpenStack env variables set on login
Closed, ResolvedPublic

Description

The OpenStack utilities installed on nodepool can be configured via env variable to pass the tenant, user, password etc. It would be rather convenient to have the env variable to be loaded in the nodepool user profile.

At a minimum:

OS_USERNAME=nodepoolmanager
OS_PASSWORD=
OS_TENANT_ID=contintcloud
OS_AUTH_URL=http://labcontrol1001.wikimedia.org:35357/v2.0/

Will let us run openstack server list among others.

Event Timeline

hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar added a subscriber: hashar.

We can probably use the puppet wmflibs function shell_exports:

Invocation:

shell_exports({
  apache_run_user => 'apache',
  apache_pid_file => '/var/run/apache2/apache2.pid',
})

Output:

export APACHE_RUN_USER="apache"
export APACHE_PID_FILE="/var/run/apache2/apache2.pid"

Change 220444 had a related patch set uploaded (by Hashar):
nodepool: provide openstack env variables to system user

https://gerrit.wikimedia.org/r/220444

Change 220444 merged by Andrew Bogott:
nodepool: provide openstack env variables to system user

https://gerrit.wikimedia.org/r/220444

hashar claimed this task.
hashar moved this task from Backlog to Done on the Continuous-Integration-Scaling board.

/var/lib/nodepool/.profile is populated by puppet