Last modified: 2012-06-29 10:57:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T38352, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36352 - add environment variable $PROJECTNAME to bashrc
add environment variable $PROJECTNAME to bashrc
Status: VERIFIED FIXED
Product: Wikimedia Labs
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Ryan Lane
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-30 15:01 UTC by Daniel Zahn
Modified: 2012-06-29 10:57 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Zahn 2012-04-30 15:01:04 UTC
Currently we have $INSTANCENAME we can use in scripting. quoting Platonides when i asked for the instance name:

"It's defined in the environment variable INSTANCENAME, which is set in
/etc/bash.bashrc.
Some openstack template must be copying the nice name there."

Now there is another script that would need $PROJECTNAME, for a "log" command to SAL from a shell: -->  (https://gerrit.wikimedia.org/r/#patch,sidebyside,6118,1,files/logs/log)

Having $PROJECTNAME would be nice for scripting in general i'm sure. Please add it right after INSTANCENAME in bashrc using the template.
Comment 1 Antoine "hashar" Musso (WMF) 2012-06-29 10:30:00 UTC
https://gerrit.wikimedia.org/r/13444 alters the bashrc to publish instanceproject as the INSTANCEPROJECT environnement variable. This is similar to how we do it for INSTANCENAME.
Comment 2 Daniel Zahn 2012-06-29 10:50:14 UTC
thanks! merged.
Comment 3 Antoine "hashar" Musso (WMF) 2012-06-29 10:57:34 UTC
Works:

hashar@deployment-dbdump:~$ echo $INSTANCEPROJECT
deployment-prep

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links