close

Filter

loading table of contents...

Deployment Manual / Version 2107

Table Of Contents

2.7 Customize the Deployment Archive

There are several ways to customize or extend the deployment archive. In this section you will find some quick examples on how to proceed.

Change installation destination

By default, all applications will be installed below /opt/coremedia. If you want to change this you simply need to use a different value for the node['blueprint']['base_dir'] attribute. There are some loosely related attributes you may also change like the Solr home directory node['blueprint']['solr']['solr_home'].

Change log file destination

By default, the log files will be written to a directory below the applications directory, for example, /opt/coremedia/studio-server/log. For convenience a symbolic link will be created for the to access all logs below a common logging directory configurable by the attribute node['blueprint']['log_dir'].

Customize the Roles

The roles provided below the roles directory are not mandatory and just represent a minimal example. Please feel free to adapt the setup to your needs. You can remove them completely and directly use the recipes in your run list or define new ones to match your desired topology. Using only chef-solo without a Chef server, roles only have little use.

Adding additional Chef Cookbooks

You can add cookbooks to install any kind of software, for example, by downloading them from the Chef Supermarket and adding them to the thirdparty-cookbooks directory, but you have to add all transitive cookbook dependencies as well. Beside that, make sure that the actual Chef version is supported by the cookbook and that there are no dependency resolution errors.

Adding more Spring Boot applications

It is very simple to add more applications to the deployment archive but you have to adapt the right places in the workspace:

  • At first, you need to make sure the artifact is packaged into the archive. To achieve this, you need to add a Maven dependency to the application artifact in the deployment/chef/pom.xml, that is:

    <dependency>
      <groupId>my.org</groupId>
      <artifactId>my-application</artifactId>
      <version>1.0</version>
    </dependency>
    

    If the application artifact is part of your blueprint workspace, you should use ${project.groupId} and ${project.version} to follow Maven best practice.

    You should verify, that after rebuilding the deployment archive, that your application artifact is packaged within the maven-repo folder of the archive.

  • Now that the application artifact is available, you can add a new recipe in the blueprint-spring-boot cookbook by copying one of the simpler recipes, for example, headless-server-live.rb. Now you only need to replace the service_name at the top and replace all basic application.properties attribute setters with the ones you require. Make sure to you use node.default_unless to set them, otherwise you won't be able to overwrite them in the node JSON file.

  • The last step is to add the newly created recipe to the runlist. This can be either done in one of the roles, a new role or simply in the node JSON file.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.