Skip to content

UrbanCode/udclient-as-container

Repository files navigation

udclient-as-container

build your own containerized version of udclient (deploy cli)

Download/copy udclient and build your docker container

Download from your DevOps Deploy installation ("https://yourDeployServer:port/tools/udclient.zip") or Copy from installation media of your Deploy Server( <installmediaroot/opt/tomcat/webapps/ROOT/tools/>) your udclient.zip into this location, unzip it and run docker build

example shell script building with docker

export DEPLOY_VERSION=8.0.0
wget https://<yourDeployServerurl:port>/tools/udclient.zip
unzip udclient
docker build . -t udclient:$DEPLOY_VERSION

using Dockerfile.variations

here an example with building for semeru-11 target

example shell script building with docker targets

export DOCKER_BUILDKIT=1
export JRETYPE=semeru-11
export DEPLOY_VERSION=8.0.0
wget https://<yourDeployServerurl:port>/tools/udclient.zip
unzip udclient
docker build -f Dockerfile.variations --build-arg 'TARGET='$JRETYPE -t udclient:$DEPLOY_VERSION-$JRETYPE .  

what is udcli?

Wrapper around calling udclient as direct call of udclient did not work.
Got always "Didn't find /usr/local/bin/lib/udclient-lib.jar in directory /usr/local/bin" error.

How to use this docker container

Usage is similar to the installed cli client. Just add the call to the docker container to it.

Example how to run container

 docker run udclient -weburl https://<yourDeployServerurl:port> -username <your username> -password <your password> getAgents

Default output without parameters

If you run it without any parameters you will get a simple help info

 docker run --rm udclient                              
 Global Args:

         -authtoken, --authtoken
            Optional. Can be set via the environment variable DS_AUTH_TOKEN. An authentication token generated by the server. Either an authtoken or a username and password is required

         -loggingConf, --loggingConf
            Optional. Can be set via the environment variable loggingConf. A properties file for custom log4j 2 configuration. Overrides debug and debugHttp flags.

         -password, --password
            Optional. Can be set via the environment variable DS_PASSWORD. A password to authenticate with the server. Either an authtoken or a username and password is required

         -proxyHost, --proxyHost
            Optional. Can be set via the environment variable proxyHost. The hostname of a proxy (e.g., an agent relay) to use instead of directly connecting to the server

         -proxyPassword, --proxyPassword
            Optional. Can be set via the environment variable proxyPassword. A password to authenticate with the proxy.

         -proxyPort, --proxyPort
            Optional. Can be set via the environment variable proxyPort. The proxy port to use if a proxy hostname has been specified

         -proxyUser, --proxyUser
            Optional. Can be set via the environment variable proxyUser. A username to authenticate with the proxy.

         -username, --username
            Optional. Can be set via the environment variable DS_USERNAME. A username to authenticate with the server. Either an authtoken or a username and password is required

         -verifyServerIdentity, --verifyServerIdentity
            Optional. Can be set via the environment variable UC_TLS_VERIFY_CERTS. This option will only allow the command to complete if the server\'s certificate is trusted. (Default Value: false)

         -weburl, --weburl
            Required. Can be set via the environment variable DS_WEB_URL. The base URL of the UrbanCode Deploy server. Eg. http://ucd.domain.com:8080

 Global Flags:

         -t, --getTemplate
            Show the JSON template for the command instead of running the command. If a file argument is provided, the template will be output to that file.

         -h, --help
            Print the full description and help of the given command instead of running the command.

         -v, --verbose
            Print extra information during execution.

         --debug
            Print debugging information during execution. Implies verbose.

         --debugHttp
            Print detailed HTTP debugging information during execution.

 Commands:

         Provide a web URL, username, and password to show all available commands.

Resources used

About

build your own containerized version of udclient (deploy cli)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published