Cloud Foundation Solutions

Overview

So far we have covered the re-usable modules in the library that can be assembled to build solutions. The library also includes complete solutions built using these modules.

There are provided both as examples of how the modules can be used, and also as complete solutions that can be copied, extended and improved.

The solutions are designed to be production quality and suitable as a template for a production deployment.

Structure

The solutions can be found in the solutions folder at the top level of the Cloud Foundation Library. Each solution is directory with the standard Terraform files that you will find in most deployment solutions. We have included a “Hello World” simple example that deploys a simple webserver and database system. To deploy this as a solution, folder all that is required is to amend the terraform.tfvars file to suit your target environment.

+ Hello-WebServer
    - locals.tf
    - main.tf
    - provider.tf
    - terraform.tfvars
    - variables.tf
    + modules
        + provisioner
            - provisioner.tf
            - variables.tf

If we now look inside the main.tf file, then we see that it only comprises calls to standard resource modules from the cloud foundation library - i.e. the full solution is an assembly of calls to seven standard modules that deploy the resources required :

More complex solutions

For more complex deployments, we also introduce a second level of terraform modules for solution subsystems - we described this in the previous section Modules] and called them Composite Modules. You can see how this works in the Weblogic Clustered Deployment where composite modules are used for groups of resources :

Each of these sub-system level modules can also be used outside the context of this specific solution.

Composite Modules

Using modules to build more complex solutions

While modules to deploy single OCI resources are useful, we can increase the value of the re-use by building more complex modules which can themselves be re-used. We call these “composite” modules as they call other more basic modules and allow us to “assemble” more complex architecture patterns. For example, an implementation of Oracle’s Weblogic server includes many component parts, and these components may vary in number and configuration. Creating a single module to deploy the complete architecture pattern that also accepts parameters (e.g. size of the cluster) allows re-use of the module across environments and applications.

We have a fully worked example of a Weblogic and database server solution in the solutions folder in the Cloud Foundation Library.

Weblogic Examples