Command line manipulation of objects

Up to version 4.31 SGD has had 2 GUI sysadmin tools:

  1. Object Manager - configuration of apps, servers and users;
  2. Array Manager - configuration of the SGD software itself.

In this blog we'll look at Object Manager equivalent command lines, and in later blogs we'll cover the Array Manager equivalents.

Manipulation of objects is all via the /opt/tarantella/bin/tarantella object command. There are 2 types of objects:leaf objects and container objects; and objects can be created, deleted, edited and listed.

As a simple example here's how you can browse the SGD datastore: A default datastore starts off with a root container called "o=organization" and you can list the contents of containers using the list_contents command.

/opt/tarantella/bin/tarantella object list_contents --name "o=organization"

Doing this you get output like this:

...
cn=konsole (servername)
cn=xclock (servername)
...

And then you can examine the leaf objects, so:

/opt/tarantella/bin/tarantella object list_attributes --name "o=organization/cn=xclock (servername)"
Attributes for .../_ens/o=organization/cn=xclock (servername):
Name: "xclock (servername)"
accel:
app: /usr/bin/X11/xclock
appserv: "o=organization/cn=Tarantella server servername"
args: "-bw 1 geometry 198x198+0+0"
clipboardlevel: 3
...

You can change the object's attributes from the command line too. For example, let's make the clock bigger...

/opt/tarantella/bin/tarantella object edit --name "o=organization/cn=xclock (servername)" --width 1000 --height 1000 --args "-bw 1 -geometry 1000x1000+0+0"

Notice how we changed 3 attribute values at once here.

Finally for now, the more observant amongst you may realize that when you run a command line, SGD starts up a jvm instance. And so running a script of multiple command lines may take some time as jvm's start up and close down. So we recommend in this instance that you use the

/opt/tarantella/bin/tarantella object script"
command.

Fat Bloke uses this command in this simple script to provision his servers after install.

-FB

Comments:

Hi FB!

I've enjoyed reading this series of yours about the tarantella command line and in the spirit of script sharing and on the subject of tarantella object, here's a little tool I've knocked up in perl to give me a text representation of an ENS tree. All bugs are mine :)

http://sqrlgrl.blogspot.com/2007/09/from-things-sun-should-have-given-me.html

Cheers,
SG

Posted by Sqrlgrl on September 10, 2007 at 11:40 PM BST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Fat Bloke

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today