Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Questions about perfsonar 4

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Questions about perfsonar 4


Chronological Thread 
  • From: Andrew Lake <>
  • To: Daniel Spisak <>
  • Cc:
  • Subject: Re: [perfsonar-user] Questions about perfsonar 4
  • Date: Thu, 16 Feb 2017 09:05:33 -0500
  • Ironport-phdr: 9a23:X3Eu/RJp1XS2WO/TOdmcpTZWNBhigK39O0sv0rFitYgfLf7xwZ3uMQTl6Ol3ixeRBMOAuq8C07ad7v2ocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbQhFgDqwbaluIBi5ognctskbipZ+J6gszRfEvmFGcPlMy2NyIlKTkRf85sOu85Nm7i9dpfEv+dNeXKvjZ6g3QqBWAzogM2Au+c3krgLDQheV5nsdSWoZjBxFCBXY4R7gX5fxtiz6tvdh2CSfIMb7Q6w4VSik4qx2UxLjljsJOCAl/2HWksxwjbxUoBS9pxxk3oXYZJiZOOdicq/BeN8XQ3dKUMRMWCxbGo6yb4kAD+QGM+lXoYfzpEYAowWiCgS3Huzj1iVFi2Xs0KEm0eksFxzN0gw6H9IJtXTZtMn4NKEPXuCv0qbJwyjIYfVM1jf+9ofDbxcsruuKXb1tccvc0lcgFxjfglWWt4PlIyqY2+IQuGaV6OpgUPigi28hqwxpuDev3t8shZTJh4IT0F/E8CR5z5ouJdGiVEF7ZtukHINMtyCUNot2Xt8iTH9yuCog1rIGvpu7cDASyJs53R7fZeeHc4+O4h35TuadOzF4i2x5eL6niBay8FSgyu3hVsavylpFsi1FktzUunAVzRzT7c+HSvVl/kem2DaP0RzT5vtYLkAzkKrXM5shwqM0lpoPsETPBy/7mEvzjKCMb0kp+uao6+XhYrX9up+TLYt0igXkPqQuhsy/BOA4PhAAX2eB5euzyqbs/Ur+QLVJlPE5jq7ZsJXcKM8GpaC5GxdY3ps95xu8FTur3s4UkHYaIF5feR+KjJDlN0/SLP38F/uygFShnC11y/zbMLDtGJfAImbFnbz8Z7hy8VRcxxA2zd1H55JbFLUBIPXrV0//qtPVAAU1MwivzObjEtl92YQeWXyXDq+YNqPdr0OI6/oyL+WSZ4IZojjwJ+Iq6vLzl3M0mFwQcbGs3ZQNaXC4GvpmI1+eYXrpmtoOC2EKsRc+TeHxllKCSiRfZ3CsUKIg/j07Ep6pDZ/fRoCxh7yMxD+7EYNMZmBIEVCMFnHoeJ+eW/sVdSKSOdFukiYfWLilSo8hzg2utBTkx7Z9L+rU/DEYuoz51Nhz+eLTiQ8++SZqAMuAzmHeB11zy08BQT472OhEuU1mw1TLhaRxhbpDDd1I7vBhWx8iOY/axul7AMu0UQXEKISnUlGjF/ygDSs8UZoVytwDKxJ0Hdmzph3YmSynH+lGxPSwGJUo//eEjDDKLMFnxiODjfF5gg==

Hi,

No command but below is a snippet derived from a script (https://github.com/perfsonar/toolkit/blob/master/scripts/system_environment/configure_esmond) that comes on the toolkit which parses the output of the command and drop the result in meshconfig-agent-tasks.conf . Drop that in a bash script, have chef execute it and you should be good to go. We do something similar with cfengine on ESnet.


--------
export ESMOND_ROOT=/usr/lib/esmond

#initialize python
cd $ESMOND_ROOT
if [ -e /opt/rh/python27/enable ]; then
    source /opt/rh/python27/enable
    /opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" .
fi
. bin/activate

#create api key
KEY=`python esmond/manage.py add_api_key_user perfsonar 2> /dev/null | grep "Key:" | cut -f2 -d " "`

#set API Key in meshconfig-agent-tasks.conf
if [ -n "$KEY" ]; then
    grep -q ESMOND_API_KEY /etc/perfsonar/meshconfig-agent-tasks.conf
    if [ $? == 0 ]; then
        sed -i "s/ESMOND_API_KEY/$KEY/g" /etc/perfsonar/meshconfig-agent-tasks.conf
    fi
fi
------

On February 15, 2017 at 6:18:11 PM, Daniel Spisak () wrote:

A quick question about these database user accounts. Is there a way that I can specify the username and api key secret via CLI? Otherwise I've got to figure out how to make chef capture the results of this command and frankly that sounds like a big PITA. Help me Obi-Wan Kenobe!

On Wed, Feb 15, 2017 at 5:41 AM, Andrew Lake <> wrote:
Whoops, hit send too quick on the previous note.

For this one, no need to install anything via pip, simply run the following:

cd /usr/lib/esmond
. bin/activate
python esmond/manage.py add_ps_metadata_post_user perfdata

That will get you in esmond’s python virtualenv, which has everything installed that you need. We already have an issue to update the docs everywhere to say that, just hasn’t made its way in yet, sorry for the confusion. 



On February 15, 2017 at 8:38:11 AM, Andrew Lake () wrote:





On February 14, 2017 at 10:39:41 PM, Daniel Spisak () wrote:

This section is in dire need of some love it seems and I am completely stuck here as you will see.

[root@management-centos-71 esmond]# python esmond/manage.py add_ps_metadata_post_user perfdata
Traceback (most recent call last):
  File "esmond/manage.py", line 2, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
[root@management-centos-71 esmond]# pip freeze | grep -i django





--
Daniel Spisak | Tech Lead, SaaS operations
AppDynamics
Monitor your Apps in Production. Now.

Watch our Video | Download AppDynamics for Free
Twitter | Facebook | appdynamics.com



Archive powered by MHonArc 2.6.19.

Top of Page