Node Director
Static Public Attributes | List of all members
sfi.director.util.Setup Class Reference

The Setup class' task is to determine various configuration things on startup, set up database connections, init drivers / executors / invokers, etc. More...

Static Public Attributes

static final MyProperties defaultSettings
 default settings
static DBConnection lockdb = null
 The lock database.
static DBConnection localLockdb = null
 The database used for locks local to the system we are running on.
static DBConnection jobqueuedb = null
 The job queue database.
static DBConnection cmdqueuedb = null
 The command queue database.
static DBConnection reqqueuedb = null
 The request queue database.
static DBConnection jobarchivedb = null
 The job archive database.
static DBConnection hostsdb = null
 The database where host information is stored.
static DBConnection peopledb = null
 The database where people information is stored.
static DBConnection authdb = null
 The database used for authentication purposes.
static DBConnection classesdb = null
 The database where host/person class information is stored.
static DBConnection appsdb = null
 The database where application information is stored.
static DBConnection servicesdb = null
 The database where service information is stored.
static DBConnection dsrulesdb = null
 The database where domain service rule information is stored.
static DBConnection nulldb = null
 The null database.
static DBConnection docsdb = null
 The database where documentation is stored.
static DBConnection settingsdb = null
 The database where internal settings are stored.
static DBConnection schemadb = null
 The database where object schemata are stored.
static DBConnection memorydb = null
 The RAM database.
static DBConnection objregistrydb = null
 The database where object registry information is stored.
static DBConnection objeventdb = null
 The database where object event information is stored.
static DBConnection topdb = null
 The database where the database root is.
static DirectoryAccess hostsdir = null
 The directory for host information access.
static DirectoryAccess peopledir = null
 The directory for people information access.
static DirectoryAccess classesdir = null
 The directory for host/person class information access.
static Scheduler scheduler = null
 Our current scheduler.
static MyProperties properties = null
 Our 'raw' configuration as found in the director.conf file.
static File active_properties = null
 The director.conf file we are currently using.
static String hostname
 The principal name of the host we are running on.
static Vector hostnames = new Vector()
 A complete list of names of the host we are running on.
static String masterhost
 The name of our admin server.
static String tmphost
 The name of the host storing site-wide temporary files.
static String tmpstorage = null
 The directory on tmphost where site-wide temporary files are stored.
static String programid
 A (hopefully) unique ID identifying our program.
static String programname = "sfidirector"
 Our program's name.
static String program_cmdline = ""
 Our program's command line.
static Vector localjobqueue = new Vector()
 Here jobs are stored when they are stored locally.
static String fileSeparator
 The separator between fragments of a file's path.
static String pathSeparator = ":"
 The separator between multiple file names in a list.
static String rootDir
 The directory where the director is installed.
static String imageDir
 The directory where images (icons, etc.) are located.
static String rcdir
 The path of the personal (user specific) director configuration files can be found.
static String agentcommand
 The system command we use for starting up a director agent.
static Logger logger
 The default Logger.
static boolean interactive = false
 This is true if we are running in interactive mode (thus if we are run by a user and are able to interact with him/her).
static boolean isagent = false
 This is true if we are running in agent mode.
static boolean iswindows = false
 Are we running on Windows.
static String configFile = null
 This is set by whatever CLI command is the entry point for the director if the name of the config file is supplied via a command line argument.
static String configDomain = null
 Domain name.

Detailed Description

The Setup class' task is to determine various configuration things on startup, set up database connections, init drivers / executors / invokers, etc.

Member Data Documentation

File sfi.director.util.Setup.active_properties = null
static
String sfi.director.util.Setup.agentcommand
static

The system command we use for starting up a director agent.

Referenced by sfi.director.invoker.StreamCmdInvoker.agentcommand(), and sfi.director.util.Init.setup_base().

DBConnection sfi.director.util.Setup.appsdb = null
static
DBConnection sfi.director.util.Setup.authdb = null
static
DBConnection sfi.director.util.Setup.classesdb = null
static
DirectoryAccess sfi.director.util.Setup.classesdir = null
static
DBConnection sfi.director.util.Setup.cmdqueuedb = null
static
String sfi.director.util.Setup.configDomain = null
static
String sfi.director.util.Setup.configFile = null
static

This is set by whatever CLI command is the entry point for the director if the name of the config file is supplied via a command line argument.

Referenced by sfi.director.util.Init.setup_base().

final MyProperties sfi.director.util.Setup.defaultSettings
static
Initial value:
new MyProperties( new String[] {
"AdminServerPort: 10371",
"Syslog.facility: daemon",
"Scheduler: ParallelScheduler",
"QueueCycle: 30",
"ArchiveCycle: 600",
"ArchiveMoveTime: 3600",
"ArchivePurgeCycle: 86400",
"ArchivePurgeTime: 604800",
"TmpStorage: " + ((System.getProperties().getProperty( "java.io.tmpdir" ) != null)?
System.getProperties().getProperty( "java.io.tmpdir" ) : "/tmp"),
"PPDModelDir: /usr/share/cups/model",
"TrustfulAgent: yes"
} )

default settings

Referenced by sfi.director.util.Init.setup_base().

DBConnection sfi.director.util.Setup.docsdb = null
static
DBConnection sfi.director.util.Setup.dsrulesdb = null
static
String sfi.director.util.Setup.fileSeparator
static

The separator between fragments of a file's path.

This is usually the same as the file.separator system property.

Referenced by sfi.director.util.Credentials.addFileCredentials(), sfi.director.repository.CupsPPDDir.append(), sfi.director.application.DirectorPackage.cleanUpSub(), sfi.director.application.autodoc.CollectServices.collect(), sfi.director.util.TempFile.create(), sfi.director.application.InstallerOpenLDAP.createConf(), sfi.director.application.scripttask.AppInstallHost.createPackage(), sfi.director.application.InstallerOpenLDAP.deleteDomain(), sfi.director.application.DirectorPackage.deleteRecursively(), sfi.director.application.InstallerOpenLDAP.enumSchema(), sfi.director.application.scripttask.ApplyDomainTemplate.exec(), sfi.director.application.executor.InstallFromArchive.exec(), sfi.director.application.scripttask.CreateReleaseDir.exec(), sfi.director.application.scripttask.SetServerPassword.exec(), sfi.director.application.executor.InstallFromZIP.exec(), sfi.director.application.scripttask.PublishApplication.exec(), sfi.director.invoker.Recorder.executeJob(), sfi.director.util.ZipArchive.extract(), sfi.director.util.Archive.extract(), sfi.director.application.FrontendHTTPServer.file_retrieve(), sfi.director.util.Credentials.fileCredentials(), sfi.director.system.Library.findLibrary(), sfi.director.repository.CupsPPDDir.findPPD(), sfi.director.application.DirectorPackage.freeze(), sfi.director.application.Report.generate(), sfi.director.repository.CupsPPDDir.get(), sfi.director.gui.fields.Template.init(), sfi.director.application.DirectorPackage.install(), sfi.director.application.InstallerOpenLDAP.installSchema(), sfi.director.application.FilePackageHandler.listFileName(), sfi.director.util.Tools.main(), sfi.director.application.DEBPackageHandler.makeTaskPackage(), sfi.director.util.Tools.makeZip(), sfi.director.application.executor.InstallFromZIP.mangleName(), sfi.director.application.autodoc.DocBuilder.mediafile(), sfi.director.application.DirectorPackage.metaDir(), sfi.director.application.DirectorPackage.moveFiles(), sfi.director.application.Director3PackageHandler.pkgFromFile(), sfi.director.application.config.GenericFileHandler.readConfig(), sfi.director.application.scripttask.ApplyDomainTemplate.readTemplate(), sfi.director.invoker.Recorder.Recorder(), sfi.director.application.DirectorPackage.relDir(), sfi.director.repository.CupsPPDDir.remove(), sfi.director.util.Tools.removeDir(), sfi.director.application.Report.reportDir(), sfi.director.application.Report.reportInfo(), sfi.director.cli.keyinit.run(), sfi.director.cli.init.run(), sfi.director.cli.storepassword.run(), sfi.director.application.config.ConfigDir.save(), sfi.director.application.DirectorPackage.scanRepository(), sfi.director.repository.CupsPPDDir.search(), sfi.director.util.FileStore.sectionDir(), sfi.director.application.FrontendHTTPServer.serve(), sfi.director.util.Init.setup_agent(), sfi.director.util.Init.setup_base(), sfi.director.util.Init.setup_frinterface(), sfi.director.util.Init.setup_objectregistry(), sfi.director.util.Init.setup_objeventdb(), sfi.director.util.Archive.storeAll(), sfi.director.application.autodoc.FormatHandler.templatefile(), and sfi.director.application.DirectorPackage.unpackUsingArchiver().

String sfi.director.util.Setup.hostname
static
Vector sfi.director.util.Setup.hostnames = new Vector()
static
DBConnection sfi.director.util.Setup.hostsdb = null
static
DirectoryAccess sfi.director.util.Setup.hostsdir = null
static
String sfi.director.util.Setup.imageDir
static

The directory where images (icons, etc.) are located.

boolean sfi.director.util.Setup.interactive = false
static

This is true if we are running in interactive mode (thus if we are run by a user and are able to interact with him/her).

Referenced by sfi.director.util.Init.setup_cli().

boolean sfi.director.util.Setup.isagent = false
static
boolean sfi.director.util.Setup.iswindows = false
static

Are we running on Windows.

Referenced by sfi.director.util.Init.setup_base(), and sfi.director.util.Tools.ShellCommand().

DBConnection sfi.director.util.Setup.jobarchivedb = null
static
DBConnection sfi.director.util.Setup.jobqueuedb = null
static
Vector sfi.director.util.Setup.localjobqueue = new Vector()
static

Here jobs are stored when they are stored locally.

Usually this vector contains jobs before they are pushed into the job queue database or executed locally.

See Also
Tools::executeLocalqueue()

Referenced by sfi.director.application.objevents.Workflow.addJob(), sfi.director.application.scripttask.Report.create(), sfi.director.application.scripttask.WakeOnLan.create(), sfi.director.application.scripttask.EmulateRoot.create(), sfi.director.application.scripttask.ResolveDependencies.create(), sfi.director.application.scripttask.ReloadService.create(), sfi.director.application.scripttask.ChainEvent.create(), sfi.director.application.scripttask.SetHostIP.create(), sfi.director.application.scripttask.CollectSysinfo.create(), sfi.director.application.scripttask.StoreAsDBChoice.create(), sfi.director.application.scripttask.ConfigureNetwork.create(), sfi.director.application.scripttask.RepositoryScan.create(), sfi.director.application.scripttask.ZoneUpdated.create(), sfi.director.application.scripttask.Shell.create(), sfi.director.application.scripttask.DoAppInventory.create(), sfi.director.application.scripttask.CreateHome.create(), sfi.director.application.scripttask.CreateReleaseDir.create(), sfi.director.application.scripttask.ApplyDomainTemplate.create(), sfi.director.application.scripttask.D3HostDefine.create(), sfi.director.application.scripttask.SubscribeApps.create(), sfi.director.application.scripttask.BootStrapDirector.create(), sfi.director.application.scripttask.BuildDependingDomains.create(), sfi.director.application.scripttask.CreateHomeDB.create(), sfi.director.application.scripttask.FreezeApplication.create(), sfi.director.application.scripttask.SetServerPassword.create(), sfi.director.application.scripttask.InjectUserSettings.create(), sfi.director.application.scripttask.DoAppImport.create(), sfi.director.application.scripttask.INFAppModules.create(), sfi.director.application.scripttask.CupsDrivers.create(), sfi.director.application.scripttask.PublishApplication.create(), sfi.director.application.objevents.EventEnvironment.createWorkflow(), sfi.director.application.objevents.Workflow.doEvent(), sfi.director.application.FrontendInterface.executeCommand(), sfi.director.util.Tools.executeLocalqueue(), sfi.director.application.objevents.Workflow.flush(), sfi.director.application.HostPackages.forPkg(), sfi.director.application.HostDefine.HostDefine(), sfi.director.application.FilePackageHandler.makeJob(), sfi.director.application.scripttask.AppInstallHost.remoteMethod(), and sfi.director.repository.DirectoryServiceMerger.targetJob().

DBConnection sfi.director.util.Setup.localLockdb = null
static

The database used for locks local to the system we are running on.

Referenced by sfi.director.application.FrontendInterface.ensureShortcuts(), sfi.director.util.Lock.Lock(), and sfi.director.util.Init.setup_base().

DBConnection sfi.director.util.Setup.lockdb = null
static
Logger sfi.director.util.Setup.logger
static
String sfi.director.util.Setup.masterhost
static

The name of our admin server.

Referenced by sfi.director.invoker.MasterLoopbackInvoker.accept(), sfi.director.util.Tools.applyModifier(), sfi.director.application.AdminServer.connectAdminServer(), sfi.director.application.scripttask.Report.create(), sfi.director.application.scripttask.EmulateRoot.create(), sfi.director.application.scripttask.WakeOnLan.create(), sfi.director.application.scripttask.ResolveDependencies.create(), sfi.director.application.scripttask.ChainEvent.create(), sfi.director.application.scripttask.CollectSysinfo.create(), sfi.director.application.scripttask.SetHostIP.create(), sfi.director.application.scripttask.StoreAsDBChoice.create(), sfi.director.application.scripttask.RepositoryScan.create(), sfi.director.application.scripttask.Shell.create(), sfi.director.application.scripttask.DoAppInventory.create(), sfi.director.application.scripttask.ApplyDomainTemplate.create(), sfi.director.application.scripttask.SubscribeApps.create(), sfi.director.application.scripttask.D3HostDefine.create(), sfi.director.application.scripttask.BootStrapDirector.create(), sfi.director.application.scripttask.BuildDependingDomains.create(), sfi.director.application.scripttask.FreezeApplication.create(), sfi.director.application.scripttask.SetServerPassword.create(), sfi.director.application.scripttask.INFAppModules.create(), sfi.director.application.scripttask.DoAppImport.create(), sfi.director.application.scripttask.CupsDrivers.create(), sfi.director.application.scripttask.PublishApplication.create(), sfi.director.application.FrontendInterface.executeCommand(), sfi.director.util.Tools.getHostnames(), sfi.director.application.HostDefine.HostDefine(), sfi.director.schedule.Scheduler.notifyServer(), sfi.director.application.objevents.Workflow.openMonitor(), sfi.director.application.scripttask.AppInstallHost.remoteMethod(), sfi.director.cli.passwd.run(), sfi.director.util.Init.setup_agent(), and sfi.director.util.Init.setup_base().

DBConnection sfi.director.util.Setup.memorydb = null
static
DBConnection sfi.director.util.Setup.nulldb = null
static
DBConnection sfi.director.util.Setup.objeventdb = null
static

The database where object event information is stored.

Referenced by sfi.director.application.objevents.EventEnvironment.loadevents(), and sfi.director.util.Init.setup_objeventdb().

DBConnection sfi.director.util.Setup.objregistrydb = null
static

The database where object registry information is stored.

Referenced by sfi.director.util.Init.setup_objectregistry().

String sfi.director.util.Setup.pathSeparator = ":"
static

The separator between multiple file names in a list.

Referenced by sfi.director.cli.app_import.run(), and sfi.director.application.DirectorPackage.scanRepository().

DBConnection sfi.director.util.Setup.peopledb = null
static
DirectoryAccess sfi.director.util.Setup.peopledir = null
static
String sfi.director.util.Setup.program_cmdline = ""
static
String sfi.director.util.Setup.programid
static
String sfi.director.util.Setup.programname = "sfidirector"
static

Our program's name.

This should be set by CLI classes.

Referenced by sfi.director.cli.class_define.main(), sfi.director.cli.sfidirector.main(), and sfi.director.util.SyslogThread.work().

MyProperties sfi.director.util.Setup.properties = null
static

Our 'raw' configuration as found in the director.conf file.

Referenced by sfi.director.application.InstallerOpenLDAP._frontendCredentials(), sfi.director.invoker.LoopbackInvoker.accept(), sfi.director.application.AdminServer.AdminServer(), sfi.director.application.FrontendHTTPServer.auth_login(), sfi.director.util.Tools.backupFile(), sfi.director.application.autodoc.DocBuilder.cleanDocMedia(), sfi.director.repository.NISTable.close(), sfi.director.application.autodoc.CollectServices.collect(), sfi.director.invoker.SSLInvoker.connect(), sfi.director.application.AdminServer.connectAdminServer(), sfi.director.application.InstallerOpenLDAP.createConf(), sfi.director.application.InstallerOpenLDAP.createDomain(), sfi.director.application.InstallerOpenLDAP.enumSchema(), sfi.director.application.scripttask.EmulateRoot.exec(), sfi.director.application.FrontendInterface.executeCommand(), sfi.director.util.Tools.executeLocalqueue(), sfi.director.util.Tools.exit(), sfi.director.application.autodoc.ConfigFile.fileRoot(), sfi.director.application.InstallerOpenLDAP.installSchema(), sfi.director.repository.LDAP.LDAP(), sfi.director.repository.LDAPndk.LDAPndk(), sfi.director.application.autodoc.DocBuilder.mediafile(), sfi.director.schedule.Scheduler.notifyServer(), sfi.director.application.objevents.Workflow.openMonitor(), sfi.director.schedule.ParallelScheduler.parallelizedExec(), sfi.director.schedule.Scheduler.purgeOldJobs(), sfi.director.application.config.GenericFileHandler.readConfig(), sfi.director.schedule.ParallelScheduler.removeOldJobs(), sfi.director.schedule.Scheduler.removeOldJobs(), sfi.director.cli.keyinit.run(), sfi.director.cli.init.run(), sfi.director.cli.queueworker.run(), sfi.director.cli.frinterface.run(), sfi.director.util.FileStore.sectionDir(), sfi.director.util.Init.set_db(), sfi.director.application.SetPassword.setPasswordByFilter(), sfi.director.util.Init.setup(), sfi.director.util.Init.setup_agent(), sfi.director.util.Init.setup_base(), sfi.director.util.Init.setup_frinterface(), sfi.director.util.Init.setup_objectregistry(), sfi.director.util.Init.setup_objeventdb(), sfi.director.util.TempFile.tempdir(), and sfi.director.util.SyslogThread.work().

String sfi.director.util.Setup.rcdir
static

The path of the personal (user specific) director configuration files can be found.

This is usually the ".director" subdirectory of the home directory

Referenced by sfi.director.util.Credentials.addFileCredentials(), sfi.director.application.scripttask.SetServerPassword.exec(), sfi.director.util.Credentials.fileCredentials(), sfi.director.cli.storepassword.run(), and sfi.director.util.Init.setup_base().

DBConnection sfi.director.util.Setup.reqqueuedb = null
static
String sfi.director.util.Setup.rootDir
static
Scheduler sfi.director.util.Setup.scheduler = null
static
DBConnection sfi.director.util.Setup.schemadb = null
static

The database where object schemata are stored.

Referenced by sfi.director.repository.SchemaEnforcer.getSchema(), and sfi.director.repository.config.Schema.Schema().

DBConnection sfi.director.util.Setup.servicesdb = null
static
DBConnection sfi.director.util.Setup.settingsdb = null
static

The database where internal settings are stored.

Referenced by sfi.director.repository.config.InitPackageState.InitPackageState().

String sfi.director.util.Setup.tmphost
static

The name of the host storing site-wide temporary files.

Referenced by sfi.director.jobs.JobNode.nextTmpFile(), and sfi.director.util.Init.setup_base().

String sfi.director.util.Setup.tmpstorage = null
static
DBConnection sfi.director.util.Setup.topdb = null
static

The database where the database root is.

Referenced by sfi.director.application.FrontendInterface.ensureShortcuts(), and sfi.director.util.Init.set_db().


The documentation for this class was generated from the following file: