CTL-PROJECT Command Reference
From ControlTier
Requires Version: 3.6.0
Contents |
Synopsis
ctl-project [-h] [-v] [<nodefilter options>] [-p project] [-a action] [-S] [-D] [-n]
Overview
The ctl-project command is used to adminstrate projects in the CTL framework.
Projects: CTL allows you to organize modules and resource into a "project". Projects allow you to partition your work into separate workspaces. You might choose to create a project for managing a process in a new environment or might choose to designate a project for managing a related set of services.
The ctl-project command provides a set of adminstrative actions for creating, updating and removing projects in the CTL base directory.
General Options
| Option | alternate | argument | description |
|---|---|---|---|
| -h | --help | false | displays the usage information |
| -v | --verbose | false | run verbose |
Project
| option | description | required |
|---|---|---|
| -p | Name of the project | TRUE, if more than one project exists |
If only one project exists in the CTL instance, then you can omit the "-p" option as it will be defaulted.
Action options
The ctl-project command supports several actions via the "-a" flag:
| action | description |
|---|---|
| create | Create a new project |
| install | Install the modules and resources registered in the
resources.xml file |
| remove | Remove the project directory |
| purge | Clean the project so that it only contains the
modules and resources specified in the resources.xml file |
| pview | Generate the Process View XML files for the matched resources, using the -n arguments. Can specify the resources file with -f.
|
Additional options:
| flag | description |
|---|---|
| -S,--strict | Optional flag that sets strict mode. Abides by the registrations in resources.xml file |
| -D,--install | Optional flag that specifies to run the install action. |
| -n,--name | Optional flag that specifies the name of the resource(s) to install |
Nodefilter Options
[-I <include>] [-X <exclude>] [-C threads] [-K] [-F failednodes]
These are the common Nodefilter Options used by Ctl and ctl-exec as well.
| option | description |
|---|---|
| -I filter | Included node filters, see Node filtering options |
| -X filter | Excluded node filters, see Node filtering options |
| -C count | Threadcount, defaults to 1 |
| -K | Keepgoing on node failure (no arguments) |
| -F file | Filepath to store the list of failed target nodes. If this file has already been created by CTL, then only the list of nodes found in this file are targetted. |
If Node filter options are specified, the ctl-project execution is remotely dispatched to the matching nodes by way of ctl-exec.
Example:
ctl-project -I tags=qa -p demo -a create
This is exactly the same as using ctl-exec in this way:
ctl-exec -I tags=qa -p demo -- ctl-project -p demo -a create
Execution
Examples:
ctl-project -p myproject
Create a project named "myproject"
ctl-project -p myproject --action create
Same as above.
ctl-project -p project --action install
Install resources and their modules in the project
ctl-project -p project --action install -n tomcat1
Install the tomcat1 resource and its module in the project
Files
Each project has its own configuration found under
$CTL_BASE/projects/project/etc/. These files are automatically generated on the server and stored in the WebDAV repository. The ctl-project command pulls these down when necessary.
| file | description |
|---|---|
| resources.xml | Specifies the resources and node metadata for this project |
| modules.properties | Specifies the path to the module library |
Each project has its own resources directory found under
$CTL_BASE/projects/project/resources/.
Resources are organized by type beneath the resources directory.
$CTL_BASE/projects/<project>/
|
|-- resources/
| |
| |--TypeA
| | |
| | |-- <resource>
| | `-- <resource>
| `--TypeB
| |
| |-- <resource>
| `-- <resource>
`-- modules/
|
|--TypeA
|
`--TypeB
| ||||||||||||||