Download the PHP package zenddevops/client without Composer

On this page you can find all versions of the php package zenddevops/client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package client

Table of Contents

Intro

ZendServerSDK, aka zs-client, is a command line application that communicates with Zend Server's WebAPI. It can run on all modern Operating Systems(OS) such as Linux, Mac OS X and Windows.

Requirements

PHP version >=5.3.3 with enabled phar module.

Installation

You can copy locally the latest stable version as a stand-alone file from: https://github.com/zend-patterns/ZendServerSDK/raw/master/bin/zs-client.phar

On Linux you can execute the following command:

Contributing

Linux: Build Status and Windows: Build status

If you wish to contribute to the project, please read the CONTRIBUTING.md

Usage

Run the phar file with --help to see the available commands:

Use Cases

Adding Target

A target is representing the information needed to connect to a Zend Server. Every target contains unique name and must have URL that points to the location of the Zend Server, WebAPI key and secret and optionally a target can contain information about the version of Zend Server.

To add a target run the following command:

To update a target run the command with the same --target value and provide the new values.

zsurl: if not specified, the value http://localhost:10081 is used. zsversion: if not specified, the latest Zend Server version will be used.

The information about the available targets is saved in the home directory of the current user in a file named .zsapi.ini.

Using Targets

Once a target has been defined, specify it in subsequent commands by adding its unique name to the argument list, as in this example:

Deploying PHP application

You have a PHP application that you want to deploy to Zend Server. In order to use the deployment you will have to enable deployment support, create a package and upload it to the remote server.

Below are the steps that you need to take:

Enable Deployment Support

This will add two new files in the specified folder: deployment.xml and deployment.properties.

Configure the Deployment

Using Zend Studio 10 or normal text editor edit the deployment.xml file and change the XML data to match your application name, version, etc.

Create Package

Run the following command.

It will output the name of the newly created package file. You have to use this name to install or update an existing application on Zend Server. If you want to use other name for the output file you can use the --name="{desired-zpk-name}" option.

Composer Integration

There is experimental integration with composer that allows you to download the dependant packages, as described in composer.json, download them and convert them to zpk files. The above command with composer integration will look like this

The result from the command will be list of packages in the order that they have to be installed (top first, bottom last). Example:

/tmp/zendframework.zend-stdlib-2.2.4.zpk /tmp/zendframework.zend-console-2.2.4.zpk /tmp/zendframework.zend-file-2.2.4.zpk /tmp/zendframework.zend-mvc-2.2.4.zpk /tmp/zendframework.zend-text-2.2.4.zpk /tmp/zendframework.zend-math-2.2.4.zpk /tmp/zendframework.zend-json-2.2.4.zpk /tmp/zendframework.zend-serializer-2.2.4.zpk /tmp/zenddevops.webapi-dev-dev.zpk /tmp/AddYourUniqueApplicationName-1.0.0.zpk

Deploy Package

Run the following command to install a package.

You can use the same command to update a package. User parameters during the installation can be passed using --userParams="{provide-params-as-query-string}". For example if you want to pass parameter APPLICATION_ENV and DB_TYPE then you can use the following

Safe Package Deployment

If you deploy a new version of your zpk if the old version is still being deployed then this can lead to unpredictable results. In order to prevent this you can use the --safe flag. If it is present zs-client will check if there is a current deployment going on for this app and will exit if that is the case.

Example:

If you want to be safe AND want to wait for the previous deployment to finish then you can use the --safe and --wait flags together.

Example:

Deploy Multiple Packages

If you use the composer integration then packZpk can create multiple packages, instead of one. Below is a suggestion how you can deploy these newly created packages in the correct order.

HTTP tuning

Changing Connection Timeout

In some cases we may expect slower communication between the client and the server. In that case we can set explicitly the http timeout to a bigger value. The example below shows how to set it to 40 seconds.

Accepting Self-Signed SSL Certificates

In most cases the HTTPS access to your Zend Server will use self-signed certificate. In order to instruct the client to accept the SSL certificate you can do the following.

Combining Multiple HTTP options

If you want to combine multiple HTTP options in the same request then you can format the value of the http parameter as a valid HTTP query string. Request with timeout of 40 seconds and acceptance of self-signed certificates will look like this.

Persisting the HTTP Options

If you want to keep the http options saved to a target then when defining or updating the target define also the http parameter. Format the value as valid HTTP query string. Take a look at the following example.

Output formats

In the cases where the output is text zs-client supports three formats: xml, which is the default one, json and kv(key value). To specify the desired format you have to use the --output-format parameter.

Example:

Will return `

Providing array values

Some commands accept arrays as arguments.

For example configurationExtensionsOn allows you turn on multiple extensions at the same time. The code below turns on bcmath and tidy:

Notice the syntax of the extensions value. It is a list of items having comma as delimiter. If for some reason you want to replace the comma with another delimiter this can be done by adding the new delimiter enclosed in smaller than (<) and bigger than (>). In the example below we use semicolon as delimiter:

If needed you can pass more complicated array data. For example a PHP array like the one below ...

... can be represented in the command line using the following syntax.

Here the default delimiter is &. If you want to use custom delimiter, semicolon for example, then you can specify it similar to the previous example:

Notice about delimiters: Choose your delimiter wisely.

Deployment properties syntax

In the deployment.properties file one can specify the files that will become part of the application or part of the deployment scripts. Read this document for more information. Make sure to read about the way scriptsdir.includes values are processed.

For application excludes we support following wildcard syntax:

Feedback

For questions and feedback write to slavey (at) zend DOT com.


All versions of client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
zendframework/zend-i18n Version ~2.4.0
openlss/lib-array2xml Version dev-master
zenddevops/webapi Version dev-master
mustangostang/spyc Version dev-master
slk/icm Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zenddevops/client contains the following files

Loading the files please wait ....