18 | | You can work in your own branch or trunk. For mid-sized or extensive modifications that may require intermediate commits, a branch is recommended. Once you have tested as fully as possible the branch can be deployed in order to test on the hardware during the day or on the sky at night. If your changes don't work, redeploy the previous tag (see '''Deployment''' below). Once you are confident that your modification works, then do a single merge with trunk. In this manner, only one revision needs to be merged or back out in order to add or remove your modification. When working in a branch, you should merge trunk frequently to pick up the current working version |
| 16 | The environment variable `$(HET_SRC_ROOT)` is defined as the location of the working copy of the software`$(HET_DEPLOY_DIR)` is the location of the deployment directory. |
| 17 | |
| 18 | You can work in your own branch or trunk. For mid-sized or extensive modifications that may require intermediate commits, a branch is recommended. Once you have tested as fully as possible the branch can be deployed in order to test on the hardware during the day or on the sky at night. If your changes don't work, redeploy the previous tag (see '''Deployment''' below). Once you are confident that your modification works, then do a single merge with trunk. In this manner, only one revision needs to be merged or back out in order to add or remove your modification. When working in a branch, you should merge from trunk frequently to pick up the current working version. This will insure that changes made by others will not cause conflicts with your changes. |
36 | | * New Deployment method (still being debugged) |
37 | | * is done via the script `het_release`, for example I would use the following |
38 | | * `het_release -U fowler -a jrf@utexas.edu -b /opt/het/hetdex/src/tcs -r het-operations@het.as.utexas.edu -i /opt/het/hetdex -u hetdex:hetdex -P trunk` |
39 | | * the command line flags for het_release are shown below. Note that -i is required for installation and -b is highly recommended. I use -U because my user name on hetdex-pr is different that my user name on the machines at Het. The -P flag defaults to trunk but must be used if you want to install a branch or a tag. |
| 36 | The current deployment method is done via the script `het_release`, for example I would use the following |
| 37 | |
| 38 | {{{ het_release -U fowler -a jrf@utexas.edu -b /opt/het/hetdex/src/tcs -r het-operations@het.as.utexas.edu -i /opt/het/hetdex -u hetdex:hetdex -P trunk -p all }}} |
| 39 | |
| 40 | The command line flags for het_release are shown below. Note that -i is required for installation and -b is highly recommended. I use -U because my user name on hetdex-pr is different that my user name on the machines at Het. The -P flag defaults to trunk but must be used if you want to install a branch or a tag. |
54 | | -a <email author> Sets the author for the email notification for the build. |
55 | | -b <build dir> Specifies the path where the <tag> will be checked out and built. |
| 58 | -a <email author> Sets the author for the email notification |
| 59 | for the build. |
| 60 | -b <build dir> Specifies the path where the <tag> will be |
| 61 | checked out and built. Defaults to /tmp. |
| 62 | -c <changelog> Copies the <changelog> to the given file. |
| 63 | The temporary file used for the changelog |
| 64 | is removed without copying by default. |
| 65 | -d Enable debug output. To disable system |
| 66 | and svn commands, give '-dd'. |
| 67 | -h Print this message and exit. |
| 68 | -i <install dir> Specifies the directory where the build will |
| 69 | be installed. If omitted or given an empty |
| 70 | string, the installation is skipped. Defaults |
| 71 | to "". |
| 72 | -l <log path> Writes the script console log and build log |
| 73 | under <log path>/. If empty, the log is |
| 74 | written to the current working directory. |
57 | | -c <changelog> Copies the <changelog> to the given file. The temporary file used |
58 | | for the changelog is removed without copying by default. |
59 | | -d Enable debug output. To disable system and svn commands, give '-dd'. |
60 | | -h Print this message and exit. |
61 | | -i <install dir> Specifies the directory where the build will be installed. If omitted |
62 | | or given an empty string, the installation is skipped. Defaults to |
63 | | "". |
64 | | -l <log path> Writes the script console log and build log under <log path>/. If empty, |
65 | | the log is written to the current working directory. Defaults to /tmp. |
66 | | -p <packages> List of systems to build. Packages supported are determined by top |
67 | | level directories and makefile targets. Defaults to all. |
68 | | -P <repo path> Path of the installation source in the repository. Defaults to trunk. |
69 | | -r <addresses> Specify a comma separated list of email <addresses> that will |
70 | | be sent a copy of the build and changelog. |
71 | | -R <repo> Remote location of the repository. |
72 | | Defaults to svn+ssh://hetdex-pr.as.utexas.edu/repos/het. |
73 | | -t <tag> Specify the repository path for the tag. This is the relative |
74 | | path from the root given by <repo>. |
75 | | Defaults to tags/deployment/liberty_20180904T145132. |
76 | | -u <user>:<group> Sets ownership of the insallation to <user>:<group>. |
77 | | Defaults to leaving original installation permissions set. |
78 | | -U <user> Username for all svn transactions, defaults to the current user. |
| 76 | -p <packages> List of systems to build. Packages supported |
| 77 | are determined by top level directories and |
| 78 | makefile targets. Available group targets are: |
| 79 | all, telescope, instruments, all_config, |
| 80 | telescope_config, or instruments_config. |
| 81 | Defaults to all. |
| 82 | -P <repo path> Path of the installation source in the |
| 83 | repository. Defaults to trunk. |
| 84 | -r <addresses> Specify a comma separated list of email |
| 85 | <addresses> that will be sent a copy of |
| 86 | the build and changelog. |
| 87 | -R <repo> Remote location of the repository. Defaults |
| 88 | to svn+ssh://hetdex-pr.as.utexas.edu/repos/het. |
| 89 | -t <tag> Specify the repository path for the tag. |
| 90 | This is the relative path from the root given |
| 91 | by <repo>. Defaults to |
| 92 | tags/deployment/<hostname>_<ISO8601_time>. |
| 93 | -u <user>:<group> Sets ownership of the installation |
| 94 | to <user>:<group>. |
| 95 | Defaults to leaving original installation |
| 96 | permissions set. |
| 97 | -U <user> Username for all svn transactions, |
| 98 | defaults to the current user. |
| 116 | '''Requirements and Caveats''' |
| 117 | * The build directory must be writable by the user running the `het_release` script. |
| 118 | * The installation directory must be writable by the user running the `het_release` script or by the user designated by the `-u` flag on the command line. |
| 119 | * Currently the Makefile enforces the installation user to be `hetdex`. This may change in the future. |
| 120 | * The `het_release` script is normally run on the host 'htcs'. This may also change if we do separate installation of instruments and telescope packages. |
| 121 | * Installing `telescope` or `instruments` does not install the configuration files. |
| 122 | * The target `make install_configs` is defined in makefile.commonTargets. If invoked in `$(HET_SRC_ROOT)`, it will install all the files in `$(HET_SRC_ROOT)` into `$(HET_DEPLOY_DIR)/etc`. You do not want to do this. |
| 123 | * `$(HET_SRC_ROOT)` must be defined if you invoke `make` directly. `$(HET_DEPLOY_DIR)` will default to `/opt/het/hetdex` unless explicitly defined in the environment. |
| 124 | |
| 125 | '''Examples''' |
| 126 | |
| 127 | Some reasons for doing different types of installation and examples of how to do them |
| 128 | |
| 129 | * You are working in trunk in the pas system on a bug fix. You have thoroughly tested your change and are ready to install it. You should use the command `het_release ... -P trunk -p telescope` |
| 130 | * You are working in trunk in the camra system on a bug fix. You have thoroughly tested your change and are ready to install it. You should use the command `het_release ... -P trunk -p instruments` |
| 131 | * You are working in trunk on a bug fix in het_lib. You have thoroughly tested your change and are ready to install it. You should use the command `het_release ... -P trunk -p all` |
| 132 | * You are working in trunk in the pas system on change to the configuration files. You have thoroughly tested your change and are ready to install it. You should use the command `het_release ... -P trunk -p telescope_config` |
| 133 | * You are working in trunk and adding a new spectrograph configuration file. You have thoroughly tested your change and are ready to install it. You should use the command `het_release ... -P trunk -p instruments_config` |
| 134 | * You have made changes to the pas configuration as well as adding a new spectrograph configuration. You should use the command `het_release ... -P trunk -p all_config` |
| 135 | |
| 136 | * You have made extensive changes to the executables in a new branch, you have tested it, and are ready to install your changes. You should use the command `het_release ... -P branches/my_neat_branch -p all` |
| 137 | * if you need to revert for some reason use the command `het_release ... -P tags/deployment/<last_good_tag> -p all` |
| 138 | |
| 139 | |