WebDAV

From ControlTier

Jump to: navigation, search
WebDAV

The WebDAV web application is hosted on the ControlTier server and serves as the File share supporting application deployment and maintenance processes. The WebDAV protocol allows you to write to a web repository besides just getting its content. Apache Jackrabbit is a WebDAV implementation and is included as part of the standard ControlTier distribution.

Contents

Why WebDAV?

Deployment management procedures typically involve the distribution of various kinds of files to the nodes where the deployments reside. These files may be packaged artifacts that come from an internal build process. They may be 3rd party software packages. Configuration files may also need to be distributed. Often times these files are staged to a central administrative host and either maintained on an NFS volume or pushed out via SCP. Alternatively, a web server can be used to make files accessible by HTTP clients such as wget or curl to pull them where needed.

Since file distribution is so essential to managing deployment, the ControlTier server includes a WebDAV server. WebDAV is a set of extensions to HTTP that make web content read/write. WebDAV provides a convenient means to loading files in the repository your deployment procedures need and letting your scripts access them via an HTTP client. You can use davutil commands to interact with the WebDAV repository to put, get, copy and delete files.

Using WebDAV

Browser access

Firstly, you can access the WebDAV content from your browser. Go to the server landing page (eg, http://localhost:8080) and you will see a link named "Apache Jackrabbit WebDAV Repository ". Click that link and you will see a listing of the content root (you may need to login first).

WebDAV browser access

File system access

Your operating system may include a WebDAV client and expose the repository as a disk volume. Once mounted you can access files as if they are local to your system. This can be useful to manage artifacts from a developer desktop.

Command line access

ControlTier includes the davutil command module that provides a number of methods for getting and putting files into the repository.

Of course you can also retrieve files from the WebDAV using any command line HTTP client. Here's an example using curl. A user/password will need to be specified if authentication is required.

curl --user user:pass http://server/webdav/file1 -r file1

You can find a list of open source and commercial tools supporting WebDAV access here. Some Linux users report successful use with cadaver.

The Scripters cookbook contains a number of recipes where WebDAV access is needed.

ControlTier integration

WebDAV is integrated with ControlTier at a number of levels and so sometimes its use is implicit. Workbench and Jobcenter both internally integrate with WebDAV storing files there. A number of the Core Types provide integration with WebDAV. For example, the davutil utility provides several commands to put and get files. The Package type provides commands to upload and get packaged artifacts. Finally, the Builder provides a bulk repository loading capability.


Scripting and WebDAV

Deployment management procedures typically involve the distribution of various kinds of files to the nodes where the deployments reside. These files may be packaged artifacts that come from an internal build process. They may be 3rd party software packages. Configuration files may also need to be distributed. Often times these files are staged to a central administrative host and either maintained on an NFS volume or pushed out via SCP. Alternatively, a web server can be used to make files accessible by HTTP clients such as wget or curl to pull them where needed.

Since file distribution is so essential to managing deployment, the ControlTier server includes a WebDAV server. WebDAV is a set of extensions to HTTP that make web content read/write. WebDAV provides a convenient means to loading files in the repository your deployment procedures need and letting your scripts access them via an HTTP client. You can use davutil commands to interact with the WebDAV repository to put, get, copy and delete files.

Scripting-w-webdav.png

Administrators often have sets of shell script files that eventually need to be distributed among the nodes where they are used. A common approach uses tools like SCP or rsync to copy them to remote nodes so they are present when a person or another script needs to run them. Because administrators sometimes work independently, each writing their own utility scripts, distributing them where and when they need them, scripts can be become scattered across machines. Alternatively, the administrators can use a WebDAV to store their scripts in an organizational scheme that best supports their work. These scripts can later be pulled and executed directly or from other scripts. The shellutil module supports this model and helps avoid tool sprawl. Below is an example showing the shellutil exec command executing a script stored in the WebDAV:

ctl -p project -m shellutil -c exec -- -scripturl dav://scripts/myscript.sh

The "dav://" prefix is a convenient shorthand for WebDAV repository URL.

See also WebDAV Guide


Personal tools
Namespaces
Variants
Actions
Navigation
Communication
Development
Toolbox
Print/export