Converting a Docker Compose/Fig template YML file for use in PureApplication Software

If you defined services in a fig.yml file, use the FigToPattern.py script in the command line samples directory to convert it to a virtual system pattern with linked Docker containers that you can use with PureApplication® Software.

Before you begin

The Docker Pattern Type must be installed and enabled on the system, and a Docker registry must be available on the system. For more information about configuring a Docker registry, see the Related tasks.

If you downloaded the command-line interface before version 2.1, you must download it again so that the FigToPattern.py script is available in the command line samples directory. You can download the command-line interface from the Welcome Page by clicking Download Tooling > Download command line tool.

You must run the command line in batch mode to use this script.

About this task

The following keys and commands are supported by the FigToPattern.py script:
  • links
  • image
  • volumes
  • ports
  • environment
  • command
  • mem_limit
  • volumes_from
  • privileged

The following keys and commands are not supported by the FigToPattern.py script. You must remove them from the fig.yml file before you run the script:

  • build
  • expose
  • net
  • dns
  • entrypoint
  • hostname
  • domainname
  • working_dir

Procedure

Run the FigToPattern.py script and pass the name of the fig.yml file as an argument to the script. For example,
./bin/deployer -h <host or IP address> -u <userID> -p <password> -f ./sample/FigToPattern.py  <ymlFile>

Results

A .zip file is created in the same directory where you ran the command. That file is automatically imported to PureApplication Software. You do not need to import it manually.

What to do next

Set a password for the pattern before you deploy it.