Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Feb 28, 2024
1 parent 4be572f commit ffb40f7
Show file tree
Hide file tree
Showing 26 changed files with 306 additions and 527 deletions.
66 changes: 55 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,58 @@
# Pulumi AEM Compose Provider
![AEM Compose Logo](docs/logo-with-text.png)
[![WTT Logo](docs/wtt-logo.png)](https://www.wundermanthompson.com/service/technology)

[![Apache License, Version 2.0, January 2004](docs/apache-license-badge.svg)](http://www.apache.org/licenses/)

# AEM Compose - Pulumi Native Provider

This provider allows development teams to easily set up [Adobe Experience Manager (AEM)](https://business.adobe.com/products/experience-manager/adobe-experience-manager.html) instances on virtual machines in the cloud (AWS, Azure, GCP, etc.) or bare metal machines.
It's based on the [AEM Compose](https://github.com/wttech/aemc) tool and aims to simplify the process of creating AEM environments without requiring deep DevOps knowledge.

Published in [Pulumi Registry](https://www.pulumi.com/registry/packages/aem-native/).

## Purpose

The main purpose of this provider is to enable users to:

- Set up as many AEM environments as needed with minimal effort
- Eliminate the need for deep DevOps knowledge
- Allow for seamless integration with popular cloud platforms such as AWS and Azure
- Provide a simple and efficient way to manage AEM instances

## Features

- Easy configuration and management of AEM instances
- Support for multiple cloud platforms and bare metal machines
- Seamless integration with Terraform for infrastructure provisioning
- Based on the powerful [AEM Compose](https://github.com/wttech/aemc) tool

## Quickstart

The easiest way to get started is to review, copy and adapt provided examples:

1. AWS EC2 instance with private IP
* [TypeScript](examples/ts_aws_ssm)
* [GoLang](examples/go_aws_ssm)
2. AWS EC2 instance with public IP
* [TypeScript](examples/ts_aws_ssm)
* [GoLang](examples/go_aws_ssm)
3. Bare metal machine
* [TypeScript](examples/ts_bare)
* [GoLang](examples/go_bare)

- - -

## Development

This repository is showing how to create and locally test a native Pulumi provider.

## Authoring a Pulumi Native Provider
### Authoring a Pulumi Native Provider

This creates a working Pulumi-owned provider named `aem`.
It implements a random number generator that you can [build and test out for yourself](#test-against-the-example) and then replace the Random code with code specific to your provider.


### Prerequisites
#### Prerequisites

Prerequisites for this repository are already satisfied by the [Pulumi Devcontainer](https://github.com/pulumi/devcontainer) if you are using Github Codespaces, or VSCode.

Expand All @@ -21,7 +65,7 @@ If you are not using VSCode, you will need to ensure the following tools are ins
* [TypeScript](https://www.typescriptlang.org/)


### Build & test the AEM provider
#### Build & test the AEM provider

1. Create a new Github CodeSpaces environment using this repository.
1. Open a terminal in the CodeSpaces environment.
Expand All @@ -30,7 +74,7 @@ If you are not using VSCode, you will need to ensure the following tools are ins
1. Run `make up` to run the example program in `examples/yaml`.
1. Run `make down` to tear down the example program.

#### Build the provider and install the plugin
##### Build the provider and install the plugin

```bash
$ make build install
Expand All @@ -43,7 +87,7 @@ This will:
3. Generate the dotnet, Go, Node, and Python SDKs and place them in the `./sdk` folder
4. Install the provider on your machine.

#### Test against the example
##### Test against the example

```bash
$ cd examples/simple
Expand All @@ -55,7 +99,7 @@ $ pulumi up

Now that you have completed all of the above steps, you have a working provider that generates a random string for you.

#### A brief repository overview
##### A brief repository overview

You now have:

Expand All @@ -66,22 +110,22 @@ You now have:
4. `examples` a folder of Pulumi programs to try locally and/or use in CI.
5. A `Makefile` and this `README`.

#### Additional Details
##### Additional Details

This repository depends on the pulumi-go-provider library. For more details on building providers, please check
the [Pulumi Go Provider docs](https://github.com/pulumi/pulumi-go-provider).

### Build Examples
#### Build Examples

Create an example program using the resources defined in your provider, and place it in the `examples/` folder.

You can now repeat the steps for [build, install, and test](#test-against-the-example).

## Configuring CI and releases
### Configuring CI and releases

1. Follow the instructions laid out in the [deployment templates](./deployment-templates/README-DEPLOYMENT.md).

## References
### References

Other resources/examples for implementing providers:
* [Pulumi Command provider](https://github.com/pulumi/pulumi-command/blob/master/provider/pkg/provider/provider.go)
Expand Down
1 change: 1 addition & 0 deletions docs/apache-license-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
page_title: "AEM Provider"
subcategory: ""
---

[![AEM Compose Logo](https://github.com/wttech/aemc/raw/main/docs/logo-with-text.png)](https://github.com/wttech/aemc)
[![WTT Logo](https://github.com/wttech/aemc/raw/main/docs/wtt-logo.png)](https://www.wundermanthompson.com/service/technology)

# AEM Provider

This provider allows developers and development teams to easily set up [Adobe Experience Manager (AEM)](https://business.adobe.com/products/experience-manager/adobe-experience-manager.html) instances on virtual machines in the cloud (AWS, Azure, GCP, etc.) or bare metal machines.
It's based on the [AEM Compose](https://github.com/wttech/aemc) tool and aims to simplify the process of creating AEM environments without requiring deep DevOps knowledge.

## Purpose

The main purpose of this provider is to enable users to:

- Set up as many AEM environments as needed with minimal effort
- Eliminate the need for deep DevOps knowledge
- Allow for seamless integration with popular cloud platforms such as AWS and Azure
- Provide a simple and efficient way to manage AEM instances

## Features

- Easy configuration and management of AEM instances
- Support for multiple cloud platforms and bare metal machines
- Seamless integration with Terraform for infrastructure provisioning
- Based on the powerful [AEM Compose](https://github.com/wttech/aemc) tool




90 changes: 90 additions & 0 deletions docs/logo-only.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/logo-with-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 128 additions & 0 deletions docs/resources/instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
page_title: "AEM Provider - Resource 'aem_instance'"
subcategory: ""
---

[![AEM Compose Logo](https://github.com/wttech/aemc/raw/main/docs/logo-with-text.png)](https://github.com/wttech/aemc)
[![WTT Logo](https://github.com/wttech/aemc/raw/main/docs/wtt-logo.png)](https://www.wundermanthompson.com/service/technology)

# AEM Provider - Resource 'aem_instance'

The instance resource allows you to create and manage AEM instances.

With this resource, you can set up one or many AEM instances on a single machine.

If you need to set up multiple AEM instances on multiple machines, you can use this resource multiple times. However, remember to use different client settings and adapt the compose configuration accordingly. This is because the default configuration assumes that both AEM author and publish are set up on the same machine.

## Example usages

Consider reviewing the following examples to find the one that best suits your needs:

1. [AWS EC2 instance with public IP](https://github.com/wttech/terraform-provider-aem/tree/main/examples/aws_ssh)
2. [AWS EC2 instance with private IP](https://github.com/wttech/terraform-provider-aem/tree/main/examples/aws_ssm)
3. [Bare metal machine](https://github.com/wttech/terraform-provider-aem/tree/main/examples/bare_metal_ssh)



<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `client` (Block, Optional) Connection settings used to access the machine on which the AEM instance will be running. (see [below for nested schema](#nestedblock--client))
- `compose` (Block, Optional) AEM Compose CLI configuration. See [documentation](https://github.com/wttech/aemc#configuration). (see [below for nested schema](#nestedblock--compose))
- `files` (Map of String) Files or directories to be copied into the machine.
- `system` (Block, Optional) Operating system configuration for the machine on which AEM instance will be running. (see [below for nested schema](#nestedblock--system))

### Read-Only

- `instances` (Attributes List) Current state of the configured AEM instances. (see [below for nested schema](#nestedatt--instances))

<a id="nestedblock--client"></a>
### Nested Schema for `client`

Required:

- `settings` (Map of String) Settings for the connection type
- `type` (String) Type of connection to use to connect to the machine on which AEM instance will be running.

Optional:

- `action_timeout` (String) Used when trying to connect to the AEM instance machine (often right after creating it). Need to be enough long because various types of connections (like AWS SSM or SSH) may need some time to boot up the agent.
- `credentials` (Map of String, Sensitive) Credentials for the connection type
- `state_timeout` (String) Used when reading the AEM instance state when determining the plan.


<a id="nestedblock--compose"></a>
### Nested Schema for `compose`

Optional:

- `config` (String) Contents of the AEM Compose YML configuration file.
- `configure` (Attributes) Script(s) for configuring a launched instance. Must be idempotent as it is executed always when changed. Typically used for installing AEM service packs, setting up replication agents, etc. (see [below for nested schema](#nestedatt--compose--configure))
- `create` (Attributes) Script(s) for creating an instance or restoring it from a backup. Typically customized to provide AEM library files (quickstart.jar, license.properties, service packs) from alternative sources (e.g., AWS S3, Azure Blob Storage). Instance recreation is forced if changed. (see [below for nested schema](#nestedatt--compose--create))
- `delete` (Attributes) Script(s) for deleting a stopped instance. (see [below for nested schema](#nestedatt--compose--delete))
- `download` (Boolean) Toggle automatic AEM Compose CLI wrapper download. If set to false, assume the wrapper is present in the data directory.
- `version` (String) Version of AEM Compose tool to use on remote machine.

<a id="nestedatt--compose--configure"></a>
### Nested Schema for `compose.configure`

Optional:

- `inline` (List of String) Inline shell commands to be executed
- `script` (String) Multiline shell script to be executed


<a id="nestedatt--compose--create"></a>
### Nested Schema for `compose.create`

Optional:

- `inline` (List of String) Inline shell commands to be executed
- `script` (String) Multiline shell script to be executed


<a id="nestedatt--compose--delete"></a>
### Nested Schema for `compose.delete`

Optional:

- `inline` (List of String) Inline shell commands to be executed
- `script` (String) Multiline shell script to be executed



<a id="nestedblock--system"></a>
### Nested Schema for `system`

Optional:

- `bootstrap` (Attributes) Script executed once upon instance connection, often for mounting on VM data volumes from attached disks (e.g., AWS EBS, Azure Disk Storage). This script runs only once, even during instance recreation, as changes are typically persistent and system-wide. If re-execution is needed, it is recommended to set up a new machine. (see [below for nested schema](#nestedatt--system--bootstrap))
- `data_dir` (String) Remote root path in which AEM Compose files and unpacked AEM instances will be stored.
- `env` (Map of String) Environment variables for AEM instances.
- `service_config` (String) Contents of the AEM system service definition file (systemd).
- `user` (String) System user under which AEM instance will be running. By default, the same as the user used to connect to the machine.
- `work_dir` (String) Remote root path where provider-related files will be stored.

<a id="nestedatt--system--bootstrap"></a>
### Nested Schema for `system.bootstrap`

Optional:

- `inline` (List of String) Inline shell commands to be executed
- `script` (String) Multiline shell script to be executed



<a id="nestedatt--instances"></a>
### Nested Schema for `instances`

Read-Only:

- `aem_version` (String) Version of the AEM instance. Reflects service pack installations.
- `attributes` (List of String) A brief description of the state details for a specific AEM instance. Possible states include 'created', 'uncreated', 'running', 'unreachable', 'up-to-date', and 'out-of-date'.
- `dir` (String) Remote path in which AEM instance is stored.
- `id` (String) Unique identifier of AEM instance defined in the configuration.
- `run_modes` (List of String) A list of run modes for a specific AEM instance.
- `url` (String) The machine-internal HTTP URL address used for communication with the AEM instance.
Binary file added docs/wtt-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ffb40f7

Please sign in to comment.