Creating service packages

Before you can register an application instance, you must create the required package(s) that contain all of the third-party binaries, ASC scripts, the deployment.xml file, Docker image if applicable, and any extra files for the services.

About this task

The application template defines the packages that need to be created before you can register application instances. Packaging an ASC service for deployment involves putting all service files and any dependent files that are associated with the service in a package.
Note: The package can only be up to 4 GB in size.
If you are creating Dockerized services, you can use the package to deploy the Docker image to your Docker hosts when you deploy the application instance, rather than when you start it. You can either put the Docker image into a package, which depending on the Docker operation you use, loads or imports the image from a .tar file; or you can use a package install script to pull the image from a source, for example the Docker registry. For more information, see Docker overview.
Important: Verify that all dependencies are either preinstalled or deployed with the service. For example, if your application is .NET, ensure that the .NET Framework is installed and that it is the correct version for your application.
You can use any of the following supported formats for the package:
  • .zip
  • .tar
  • .taz
  • .tar.zip
  • .tar.Z
  • .tar.gz
  • .tgz
  • .jar
  • .gz
  • .exe
Note: If using a utility other than gzip, ensure that the compression and uncompression utility is in your Path environment variable when you use egodeploy.

Procedure

  1. Collect all of the service binaries, scripts, Docker image if applicable, and extra files that are required for the service to work.
  2. Go to the directory where the files are located. Here is an example:
    deployment_dir
      deployment.xml
      ascscripts/
      package/
  3. Copy the deployment.xml file that is provided at the root of the samples folder ($EGO_CONFDIR/../../ascd/conf/samples/deployment.xml). Note that this deployment.xml file is only a sample and must be customized for each package.
  4. Create an ascscripts subfolder and copy all of the scripts to that folder.
    Ensure that all .sh files have execution permission.
  5. Create a package subfolder:
    1. Optional: paste any sample application integration packages into this folder.
    2. Optional if hosts are connected to the Internet: create a server subfolder and copy the server dependency software there.
    3. Optional if hosts are connected to the Internet: create an agent subfolder and copy the agent dependency software there.
  6. Generate the package in one of the supported formats.
    For example: tar czvf ambariasc.tar.gz deployment.xml ascscripts package.

Results

You have created the package for an application instance.

What to do next

Upload the service package for use by an application instance. You can upload the package as follows:

If you want the service package to be available for use by multiple application instances, you can upload it directly to the repository (see Adding service packages to the repository for an application instance). Then, select it for use with the application instance