Secure Global Desktop Administration Guide > Applications, documents and hosts > Populating the Secure Global Desktop organizational hierarchy using a batch script

Populating the Secure Global Desktop organizational hierarchy using a batch script

Problem

You want to populate your organizational hierarchy.

Solution

Use the batch scripting functionality of the tarantella object command to create objects within the organizational hierarchy.

Alternatives
  • Create and manipulate objects in Object Manager. This method is not recommended if you want to populate the organizational hierarchy with a large number of objects.
  • Run individual tarantella object commands in sequence. This introduces additional processing overhead, and is not recommended.

Case study

Indigo Insurance needs to create objects -- organizational units (OUs), applications, people and so on -- to reflect the structure of the organization. You want to automate this process.

Solution

  1. Design the structure of your Secure Global Desktop organizational hierarchy, reflecting the structure of Indigo Insurance. Think carefully about how you can use inheritance to make webtop management more easy.
  2. Create a file for each type of object you're using in your organizational hierarchy. Each file contains one line per object, with the correct syntax for creating the object from the appropriate tarantella object new_object_type command. For example, with five organizational units you might have a file orgunits.txt containing the following:
    --name ".../_ens/o=Indigo Insurance/ou=IT"
    --name ".../_ens/o=Indigo Insurance/ou=Sales" \
      --webtop indigo/sales/standard
    --name ".../_ens/o=Indigo Insurance/ou=Marketing" \
      --webtop indigo/marketing/standard
    --name ".../_ens/o=Indigo Insurance/ou=Finance" \
      --webtop indigo/finance/standard \
      --conntype '*:*:SSL'
    --name ".../_ens/o=Indigo Insurance/ou=Finance/ou=Administration" 

    You must use the full TFN name for each object. Do not include the command name (for example, object new_windowsapp) as part of each line.

  3. Once all your files are complete, use the tarantella object script command to process them all at once, for example like this:
    #!/bin/sh
    
    tarantella object script << EOF
    new_orgunit --file orgunits.txt
    new_group --file groups.txt
    new_host --file hosts.txt
    new_person --file people.txt
    new_xapp --file xapps.txt
    new_windowsapp --file windowsapps.txt
    new_charapp --file charapps.txt
    EOF

    tarantella object script runs each command in order, which reads and processes the appropriate file.

Next steps

Related topics