Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update premium services pages (mongodb and elasticsearch) to reflect the current state #4407

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 3 additions & 26 deletions sites/upsun/src/add-services/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ premium : true

See the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html) for more information.

## Supported versions

You can select the major and minor version.

Patch versions are applied periodically for bug fixes and the like. When you deploy your app, you always get the latest available patches.

{{< image-versions image="elasticsearch" status="supported" environment="grid" >}}
{{% note title="No supported versions" theme="info" %}}
Elasticsearch premium versions (>=7.17) aren't available on {{< vendor/name >}} yet. Deprecated versions are free to use. Alternatively, you can switch to one of the latest, free versions of [OpenSearch](/add-services/opensearch.md).
{{% /note %}}

## Deprecated versions

Expand All @@ -26,9 +22,6 @@ but they're at their end of life and are no longer receiving security updates fr

{{< image-versions image="elasticsearch" status="deprecated" environment="grid" >}}

To ensure your project remains stable in the future,
switch to [a premium version](#supported-versions).

Alternatively, you can switch to one of the latest, free versions of [OpenSearch](/add-services/opensearch.md).
To do so, follow the same procedure as for [upgrading](#upgrading).

Expand Down Expand Up @@ -111,9 +104,6 @@ export APP_ELASTICSEARCH_HOST=="$(echo $RELATIONSHIPS_JSON | jq -r '.elasticsear

{{< /codetabs >}}

For [premium versions](#supported-versions),
the service type is `elasticsearch-enterprise`.

## Usage example

### 1. Configure the service
Expand All @@ -127,8 +117,6 @@ services:
type: elasticsearch:<VERSION>
```

If you’re using a [premium version](/add-services/elasticsearch.md#supported-versions), use the ``elasticsearch-enterprise`` type instead.

Note that changing the name of the service replaces it with a brand new service and all existing data is lost. Back up your data before changing the service.

### 2. Define the relationship
Expand Down Expand Up @@ -220,8 +208,6 @@ services:
type: elasticsearch:{{% latest "elasticsearch" %}}
```

If you’re using a [premium version](/add-services/elasticsearch.md#supported-versions), use the ``elasticsearch-enterprise`` type instead.

<--->

+++
Expand All @@ -245,16 +231,12 @@ services:
type: elasticsearch:{{% latest "elasticsearch" %}}
```

If you’re using a [premium version](/add-services/elasticsearch.md#supported-versions), use the ``elasticsearch-enterprise`` type instead.

{{< /codetabs >}}

### Use in app

To use the configured service in your app, add a configuration file similar to the following to your project.

Note that configuration for [premium versions](#supported-versions) may differ slightly.

{{< codetabs >}}

+++
Expand Down Expand Up @@ -359,8 +341,6 @@ To do so, include the following in your `{{< vendor/configfile "services" >}}` c
{{% /snippet %}}
```

If you're using a [premium version](#supported-versions),
use the `elasticsearch-enterprise` type.

That enables mandatory HTTP Basic auth on all requests.
The credentials are available in any relationships that point at that service,
Expand Down Expand Up @@ -401,9 +381,6 @@ To enable them, list them under the `configuration.plugins` key in your `{{< ven
{{% /snippet %}}
```

If you're using a [premium version](#supported-versions),
use the `elasticsearch-enterprise` type.

In this example you'd have the ICU analysis plugin and Python script support plugin.

If there is a publicly available plugin you need that isn't listed here, [contact support](/learn/overview/get-support.md).
Expand Down
206 changes: 10 additions & 196 deletions sites/upsun/src/add-services/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ premium: true

{{< description >}}

## Supported versions

You can select the major and minor version.
{{% note title="No supported versions" theme="info" %}}
MongoDB Enterprise isn't available on {{< vendor/name >}} yet. Deprecated versions are free to use.
{{% /note %}}

Patch versions are applied periodically for bug fixes and the like.
When you deploy your app, you always get the latest available patches.
### Deprecated versions

{{< image-versions image="mongodb-enterprise" status="supported" environment="grid" >}}

{{% deprecated-versions %}}
The following versions are [deprecated](/glossary.html#deprecated-versions).
They're available, but they aren't receiving security updates from upstream and aren't guaranteed to work.

{{< image-versions image="mongodb-enterprise" status="deprecated" environment="grid" >}}

Expand Down Expand Up @@ -69,7 +68,7 @@ MONGODB_REL=mongodb
MONGODB_QUERY={'is_master': True}
MONGODB_PATH=main
MONGODB_PASSWORD=
MONGODB_TYPE=mongodb-enterprise:{{% latest "mongodb-enterprise" %}}
MONGODB_TYPE=mongodb:{{% latest "mongodb" %}}
MONGODB_PORT=27017
```

Expand Down Expand Up @@ -97,7 +96,7 @@ The structure of the `PLATFORM_RELATIONSHIPS` environment variable can be obtain
},
"path": "main",
"password": null,
"type": "mongodb-enterprise:{{% latest "mongodb-enterprise" %}}",
"type": "mongodb:{{% latest "mongodb" %}}",
"port": 27017
}
```
Expand All @@ -116,191 +115,6 @@ export APP_MONGODBDATABASE_HOST="$(echo $RELATIONSHIPS_JSON | jq -r '.mongodb[0]

## Usage example

### Enterprise edition example

#### 1. Configure the service

To define the service, use the ``mongodb-enterprise`` type:

```yaml {configFile="app"}
services:
# The name of the service container. Must be unique within a project.
<SERVICE_NAME>:
type: mongodb-enterprise:<VERSION>
```

Note that changing the name of the service replaces it with a brand new service and all existing data is lost. Back up your data before changing the service.

#### 2. Define the relationship

To define the relationship, use the following configuration:
{{< codetabs >}}

+++
title=Using default endpoints
+++

```yaml {configFile="app"}
applications:
# The name of the app container. Must be unique within a project.
<APP_NAME>:
# Relationships enable access from this app to a given service.
# The example below shows simplified configuration leveraging a default service
# (identified from the relationship name) and a default endpoint.
# See the Application reference for all options for defining relationships and endpoints.
relationships:
<SERVICE_NAME>:
```

You can define `<SERVICE_NAME>` as you like, so long as it's unique between all defined services
and matches in both the application and services configuration.

The example above leverages [default endpoint](/create-apps/app-reference/single-runtime-image.md#relationships) configuration for relationships.
That is, it uses default endpoints behind-the-scenes, providing a [relationship](/create-apps/app-reference/single-runtime-image.md#relationships)
(the network address a service is accessible from) that is identical to the _name_ of that service.

Depending on your needs, instead of default endpoint configuration,
you can use [explicit endpoint configuration](/create-apps/app-reference/single-runtime-image.md#relationships).

With the above definition, the application container (``<APP_NAME>``) now has [access to the service](#use-in-app) via the relationship ``<SERVICE_NAME>`` and its corresponding [service environment variables](/development/variables/_index.md#service-environment-variables).

<--->

+++
title=Using explicit endpoints
+++

```yaml {configFile="apps"}
applications:
# The name of the app container. Must be unique within a project.
<APP_NAME>:
# Relationships enable access from this app to a given service.
# The example below shows configuration with an explicitly set service name and endpoint.
# See the Application reference for all options for defining relationships and endpoints.
relationships:
<RELATIONSHIP_NAME>:
service: <SERVICE_NAME>
endpoint: mongodb
```

You can define ``<SERVICE_NAME>`` and ``<RELATIONSHIP_NAME>`` as you like, so long as it's unique between all defined services and relationships
and matches in both the application and services configuration.

The example above leverages [explicit endpoint](/create-apps/app-reference/single-runtime-image.md#relationships) configuration for relationships.

Depending on your needs, instead of explicit endpoint configuration,
you can use [default endpoint configuration](/create-apps/app-reference/single-runtime-image.md#relationships).

With the above definition, the application container now has [access to the service](#use-in-app) via the relationship `<RELATIONSHIP_NAME>` and its corresponding [service environment variables](/development/variables/_index.md#service-environment-variables).

{{< /codetabs >}}

For PHP, enable the [extension](/languages/php/extensions.md) for the service:

{{< codetabs >}}

+++
title=Using default endpoints
+++

```yaml {configFile="apps"}
applications:
# The name of the app container. Must be unique within a project.
<APP_NAME>:
# PHP extensions.
runtime:
extensions:
- mongodb
# Relationships enable access from this app to a given service.
# The example below shows simplified configuration leveraging a default service
# (identified from the relationship name) and a default endpoint.
# See the Application reference for all options for defining relationships and endpoints.
relationships:
<SERVICE_NAME>:
```

<--->

+++
title=Using explicit endpoints
+++

```yaml {configFile="apps"}
applications:
# The name of the app container. Must be unique within a project.
<APP_NAME>:
# PHP extensions.
runtime:
extensions:
- mongodb
# Relationships enable access from this app to a given service.
# The example below shows configuration with an explicitly set service name and endpoint.
# See the Application reference for all options for defining relationships and endpoints.
relationships:
<RELATIONSHIP_NAME>:
service: <SERVICE_NAME>
endpoint: mongodb
```

{{< /codetabs >}}

#### Example configuration

{{< codetabs >}}

+++
title=Using default endpoints
+++

```yaml {configFile="apps"}
applications:
# The name of the app container. Must be unique within a project.
myapp:
# PHP extensions.
runtime:
extensions:
- mongodb
# Relationships enable access from this app to a given service.
# The example below shows simplified configuration leveraging a default service
# (identified from the relationship name) and a default endpoint.
# See the Application reference for all options for defining relationships and endpoints.
relationships:
mongodb-enterprise:
services:
# The name of the service container. Must be unique within a project.
mongodb-enterprise:
type: mongodb-enterprise:{{% latest "mongodb-enterprise" %}}
```

<--->

+++
title=Using explicit endpoints
+++

```yaml {configFile="apps"}
applications:
# The name of the app container. Must be unique within a project.
myapp:
# PHP extensions.
runtime:
extensions:
- mongodb
# Relationships enable access from this app to a given service.
# The example below shows configuration with an explicitly set service name and endpoint.
# See the Application reference for all options for defining relationships and endpoints.
relationships:
mongodb-enterprise:
service: mongodb-enterprise
endpoint: mongodb
services:
# The name of the service container. Must be unique within a project.
mongodb-enterprise:
type: mongodb-enterprise:{{% latest "mongodb-enterprise" %}}
```

{{< /codetabs >}}

### Legacy edition example

#### 1. Configure the service
Expand Down Expand Up @@ -520,7 +334,7 @@ applications:
mongodb:
service:
mongodb:
type: mongodb-enterprise:{{% latest "mongodb-enterprise" %}}
type: mongodb:{{% latest "mongodb" %}}
```

<--->
Expand Down Expand Up @@ -553,7 +367,7 @@ applications:
endpoint: mongodb
service:
mongodb:
type: mongodb-enterprise:{{% latest "mongodb-enterprise" %}}
type: mongodb:{{% latest "mongodb" %}}
```

{{< /codetabs >}}
Expand Down
Loading