Skip to content

Commit

Permalink
Merge pull request #2177 from platformsh/legacy-images
Browse files Browse the repository at this point in the history
📝 Add shortcodes for regions and languages
  • Loading branch information
CollierCZ authored Feb 21, 2022
2 parents 886e340 + 31c84e2 commit d303de1
Show file tree
Hide file tree
Showing 29 changed files with 170 additions and 26 deletions.
64 changes: 62 additions & 2 deletions docs/data/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"84",
"86",
"91"
],
"legacy": [
"73",
"80",
"81",
"83",
"84",
"86"
]
}
},
Expand Down Expand Up @@ -67,6 +75,12 @@
"2.2",
"3.1",
"5.0"
],
"legacy": [
"2.0",
"2.1",
"2.2",
"3.1"
]
}
},
Expand Down Expand Up @@ -179,6 +193,12 @@
"versions": {
"deprecated": [],
"supported": [
"1.9",
"1.10",
"1.11",
"1.12"
],
"legacy": [
"1.9",
"1.10"
]
Expand Down Expand Up @@ -314,7 +334,17 @@
"2.2",
"2.3",
"2.4",
"2.5"
"2.5",
"2.6",
"2.7"
],
"legacy": [
"2.1",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
},
Expand Down Expand Up @@ -347,7 +377,9 @@
"versions": {
"deprecated": [],
"supported": [
"1.5"
"1.5",
"2.0",
"2.1"
]
}
},
Expand Down Expand Up @@ -576,7 +608,11 @@
"versions": {
"deprecated": [],
"supported": [
"1.1",
"1.2"
],
"legacy": [
"1.1"
]
},
"versions-dedicated": {
Expand Down Expand Up @@ -779,6 +815,13 @@
"versions": {
"deprecated": [],
"supported": [
"3.5",
"3.6",
"3.7",
"3.8",
"3.9"
],
"legacy": [
"3.5",
"3.6",
"3.7",
Expand Down Expand Up @@ -823,6 +866,12 @@
"5.0",
"6.0",
"6.2"
],
"legacy": [
"3.2",
"4.0",
"5.0",
"6.0"
]
},
"versions-dedicated": {
Expand Down Expand Up @@ -891,6 +940,13 @@
"2.6",
"2.7",
"3.0"
],
"legacy": [
"2.3",
"2.4",
"2.5",
"2.6",
"2.7"
]
}
},
Expand Down Expand Up @@ -981,6 +1037,10 @@
"versions": {
"deprecated": [],
"supported": [
"1.6",
"1.8"
],
"legacy": [
"1.6"
]
},
Expand Down
16 changes: 16 additions & 0 deletions docs/layouts/shortcodes/image-versions-legacy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ $image := .Get 0 }}

{{ with (index .Site.Data.registry $image "versions" ) }}
{{ if index . "legacy" }}
{{ with (index . "legacy" | symdiff (index . "supported")) }}

<p>The following versions aren't available in the EU-1 and US-1 regions:</p>
<ul>
{{ range . }}
<li>{{ . }}</li>
{{ end }}
</ul>
<p>Consider <a href="/guides/general/region-migration.html">region migration</a> if your project is in those regions.</p>
{{ end }}
{{ end }}
{{ end }}
11 changes: 9 additions & 2 deletions docs/layouts/shortcodes/image-versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@
{{ else }}
{{ if and (eq $envParam "dedicated-gen-3") (eq $status "supported") }}
Working on it!
{{ else }}
None available
{{ if ne $status "deprecated"}}
None available
{{ end }}
{{ end }}
{{ end }}
{{ else }}
{{ if and (eq $envParam "dedicated-gen-3") (eq $status "supported") }}
Working on it!
{{ else }}
None available
{{ end }}
{{ end }}
13 changes: 13 additions & 0 deletions docs/layouts/shortcodes/language-specification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{ $type := .Get "type" }}
### Specify the language

To use {{ .Get "display_name" }}, specify `{{ $type }}` as your [app's `type`](/configuration/app/app-reference.html#type):

<!-- vale off -->
<div class="highlight-location">.platform.app.yaml</div>
{{ highlight ( printf "type: '%s:<VERSION_NUMBER>'" $type ) "yaml" "" }}

For example:

<div class="highlight-location">.platform.app.yaml</div>
{{ highlight ( readFile (printf "src/registry/images/examples/full/%s.app.yaml" $type ) ) "yaml" "" }}
5 changes: 2 additions & 3 deletions docs/src/configuration/services/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ To update the versions in this table, use docs/data/registry.json
|----------------------------------|---------------|---------------|
| {{< image-versions image="elasticsearch" status="supported" environment="grid" >}} | {{< image-versions image="elasticsearch" status="supported" environment="dedicated" >}} | {{< image-versions image="elasticsearch" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "elasticsearch" >}}

Due to a licensing change, Elasticsearch versions after 7.10 aren't supported.
For newer versions, use [OpenSearch](./opensearch.md) instead.
To switch to OpenSearch, follow the same procedure as for [upgrading](#upgrading).
Expand All @@ -39,9 +41,6 @@ To switch to OpenSearch, follow the same procedure as for [upgrading](#upgrading
|----------------------------------|---------------|---------------|
| {{< image-versions image="elasticsearch" status="deprecated" environment="grid" >}} | {{< image-versions image="elasticsearch" status="deprecated" environment="dedicated" >}} | {{< image-versions image="elasticsearch" status="deprecated" environment="dedicated-gen-3" >}} |

Elasticsearch 7.9 isn't available in the EU-1 and US-1 regions.
Consider [region migration](../../guides/general/region-migration.md) if your project is in those regions.

## Relationship

The format exposed in the `$PLATFORM_RELATIONSHIPS` [environment variable](../../development/variables/use-variables.md#use-platformsh-provided-variables):
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/headless-chrome.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Puppeteer can be used to generate PDFs and screenshots of web pages, automate fo
|----------------------------------|---------------|---------------|
| {{< image-versions image="chrome-headless" status="supported" environment="grid" >}} | {{< image-versions image="chrome-headless" status="supported" environment="dedicated" >}} | {{< image-versions image="chrome-headless" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "chrome-headless" >}}

## Relationship

The format exposed in the `$PLATFORM_RELATIONSHIPS` [environment variable](../../development/variables/use-variables.md#use-platformsh-provided-variables):
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/influxdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ It exposes an HTTP API for client interaction. See the [InfluxDB documentation](
|----------------------------------|---------------|---------------|
| {{< image-versions image="influxdb" status="supported" environment="grid" >}} | {{< image-versions image="influxdb" status="supported" environment="dedicated" >}} | {{< image-versions image="influxdb" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "influxdb" >}}

## Relationship

The format exposed in the ``$PLATFORM_RELATIONSHIPS`` [environment variable](../../development/variables/use-variables.md#use-platformsh-provided-variables):
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ It is a framework for storing, reading and analyzing streaming data. See the [Ka
|----------------------------------|---------------|---------------|
| {{< image-versions image="kafka" status="supported" environment="grid" >}} | {{< image-versions image="kafka" status="supported" environment="dedicated" >}} | {{< image-versions image="kafka" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "kafka" >}}

## Relationship

The format exposed in the ``$PLATFORM_RELATIONSHIPS`` [environment variable](../../development/variables/use-variables.md#use-platformsh-provided-variables):
Expand Down
4 changes: 3 additions & 1 deletion docs/src/configuration/services/memcached.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ Both Memcached and Redis can be used for application caching. As a general rule,

| **Grid** | **Dedicated** | **Dedicated Generation 3** |
|----------------------------------|---------------|---------------|
| {{< image-versions image="memcached" status="supported" environment="grid" >}} | {{< image-versions image="redis" status="memcached" environment="dedicated" >}} | {{< image-versions image="redis" status="memcached" environment="dedicated-gen-3" >}} |
| {{< image-versions image="memcached" status="supported" environment="grid" >}} | {{< image-versions image="memcached" status="supported" environment="dedicated" >}} | {{< image-versions image="memcached" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "memcached" >}}

## Relationship

Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/mysql/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ MySQL and MariaDB have the same behavior and the rest of this page applies to bo
|---------------|-------------|--------------------|
| {{< image-versions image="mariadb" status="supported" >}} | {{< image-versions image="mysql" status="supported" >}} | {{< image-versions image="oracle-mysql" status="supported" >}} |

{{< image-versions-legacy "mysql" >}}

### Supported versions on Dedicated environments

On Dedicated and Dedicated Generation 3 environments, only MariaDB is available with Galera for replication:
Expand Down
7 changes: 6 additions & 1 deletion docs/src/configuration/services/network-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ The network storage service enables a new kind of `mount` that refers to a share
|----------------------------------|---------------|---------------|
| {{< image-versions image="network-storage" status="supported" environment="grid" >}} | {{< image-versions image="network-storage" status="supported" environment="dedicated" >}} | {{< image-versions image="network-storage" status="supported" environment="dedicated-gen-3" >}} |

This service is a reference to a version of our network storage implementation, not to a version of a 3rd party application. `network-storage` 2.0 will *not* work on the Grid. We recommend using version 1.0 unless you are a [Dedicated Generation 3](dedicated-gen-3/overview.md) user.
{{< image-versions-legacy "network-storage" >}}

This service is the Platform.sh network storage implementation, not to a version of a third-party application.
Version 2.0 isn't recommended for the Grid.
You should use version 1.0 unless you are a [Dedicated Generation 3](../../dedicated-gen-3/overview.md) user.
Dedicated Generation 3 users can use version 2.0 even on their Development environments.

{{< note theme="warning">}}
It is not possible to upgrade or downgrade the network storage service version while keeping existing data in place. Changing the service version will require the service to be reinitialized. Any change to the service version will result in existing data becoming inaccessible.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/opensearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ To update the versions in this table, use docs/data/registry.json
|----------------------------------|---------------|---------------|
| {{< image-versions image="opensearch" status="supported" environment="grid" >}} | {{< image-versions image="opensearch" status="supported" environment="dedicated" >}} | {{< image-versions image="opensearch" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "opensearch" >}}

## Relationship

The format exposed in the [`$PLATFORM_RELATIONSHIPS` environment variable](../../development/variables/use-variables.md#use-platformsh-provided-variables):
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ See the [PostgreSQL documentation](https://www.postgresql.org/docs/9.6/index.htm
|----------------------------------|---------------|---------------|
| {{< image-versions image="postgresql" status="supported" environment="grid" >}} | {{< image-versions image="postgresql" status="supported" environment="dedicated" >}} | {{< image-versions image="postgresql" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "postgresql" >}}

\* No High-Availability on Dedicated.

{{< note >}}
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/rabbitmq.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ See the [RabbitMQ documentation](http://www.rabbitmq.com/documentation.html) for
|----------------------------------|---------------|---------------|
| {{< image-versions image="rabbitmq" status="supported" environment="grid" >}} | {{< image-versions image="rabbitmq" status="supported" environment="dedicated" >}} | {{< image-versions image="rabbitmq" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "rabbitmq" >}}

## Relationship

The format exposed in the `$PLATFORM_RELATIONSHIPS` [environment variable](../../development/variables/use-variables.md#use-platformsh-provided-variables):
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Platform.sh supports two different Redis configurations: One persistent (useful
|----------------------------------|---------------|---------------|
| {{< image-versions image="redis" status="supported" environment="grid" >}} | {{< image-versions image="redis" status="supported" environment="dedicated" >}} | {{< image-versions image="redis" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "redis" >}}

{{% deprecated-versions %}}

| **Grid** | **Dedicated** | **Dedicated Generation 3** |
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/solr.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Solr search with generic schemas provided, and a custom schema is also supported
|----------------------------------|---------------|---------------|
| {{< image-versions image="solr" status="supported" environment="grid" >}} | {{< image-versions image="solr" status="supported" environment="dedicated" >}} | {{< image-versions image="solr" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "solr" >}}

{{% deprecated-versions %}}

| **Grid** | **Dedicated** | **Dedicated Generation 3** |
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/varnish.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ However, it is possible to configure a Varnish instance as part of an applicatio
|----------------------------------|---------------|---------------|
| {{< image-versions image="varnish" status="supported" environment="grid" >}} | {{< image-versions image="varnish" status="supported" environment="dedicated" >}} | {{< image-versions image="varnish" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "varnish" >}}

## How it works

All incoming requests still go through the environment's router first. When using Varnish, a Varnish service sits between the router and the application server or servers.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/configuration/services/vault.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The Vault key management service (KMS) provides key management and access contro
|----------------------------------|---------------|---------------|
| {{< image-versions image="vault-kms" status="supported" environment="grid" >}} | {{< image-versions image="vault-kms" status="supported" environment="dedicated" >}} | {{< image-versions image="vault-kms" status="supported" environment="dedicated-gen-3" >}} |

{{< image-versions-legacy "vault-kms" >}}

## Add Vault

### Add the service
Expand Down
4 changes: 2 additions & 2 deletions docs/src/languages/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ description: |
|----------------------------------|---------------|
| {{< image-versions image="dotnet" status="supported" environment="grid" >}} | {{< image-versions image="dotnet" status="supported" environment="dedicated" >}} |

To specify a .NET Core container, use the `type` property in your [app configuration](../configuration/app/app-reference.md).
{{< image-versions-legacy "dotnet" >}}

{{< readFile file="src/registry/images/examples/full/dotnet.app.yaml" highlight="yaml" location=".platform.app.yaml" >}}
{{% language-specification type="dotnet" display_name=".Net Core" %}}

## Building the application

Expand Down
4 changes: 2 additions & 2 deletions docs/src/languages/elixir.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ description: Platform.sh supports building and deploying applications written in
|----------------------------------|---------------|
| {{< image-versions image="elixir" status="supported" environment="grid" >}} | {{< image-versions image="elixir" status="supported" environment="dedicated" >}} |

To specify an Elixir container, use the `type` property in your [app configuration](../configuration/app/app-reference.md).
{{< image-versions-legacy "elixir" >}}

{{< readFile file="src/registry/images/examples/full/elixir.app.yaml" highlight="yaml" location=".platform.app.yaml" >}}
{{% language-specification type="elixir" display_name="Elixir" %}}

## Platform.sh variables

Expand Down
4 changes: 2 additions & 2 deletions docs/src/languages/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ description: Platform.sh supports building and deploying applications written in
|----------------------------------|---------------|
| {{< image-versions image="golang" status="supported" environment="grid" >}} | {{< image-versions image="golang" status="supported" environment="dedicated" >}} |

To specify a Go container, use the `type` property in your [app configuration](../configuration/app/app-reference.md).
{{< image-versions-legacy "golang" >}}

{{< readFile file="src/registry/images/examples/full/golang.app.yaml" highlight="yaml" location=".platform.app.yaml" >}}
{{% language-specification type="golang" display_name="Go" %}}

{{% deprecated-versions %}}

Expand Down
4 changes: 2 additions & 2 deletions docs/src/languages/java/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ layout: single
|----------------------------------|---------------|
| {{< image-versions image="java" status="supported" environment="grid" >}} | {{< image-versions image="java" status="supported" environment="dedicated" >}} |

To specify a Java container, use the `type` property in your [app configuration](../../configuration/app/app-reference.md).
{{< image-versions-legacy "java" >}}

{{< readFile file="src/registry/images/examples/full/java.app.yaml" highlight="yaml" location=".platform.app.yaml" >}}
{{% language-specification type="java" display_name="Java" %}}

## Support libraries

Expand Down
4 changes: 2 additions & 2 deletions docs/src/languages/lisp.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ description: Platform.sh supports building and deploying applications written in
|----------------------------------|---------------|
| {{< image-versions image="lisp" status="supported" environment="grid" >}} | {{< image-versions image="lisp" status="supported" environment="dedicated" >}} |

To specify a Lisp container, use the `type` property in your `.platform.app.yaml`.
{{< image-versions-legacy "lisp" >}}

{{< readFile file="src/registry/images/examples/full/lisp.app.yaml" highlight="yaml">}}
{{% language-specification type="lisp" display_name="Lisp" %}}

## Assumptions

Expand Down
4 changes: 4 additions & 0 deletions docs/src/languages/nodejs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ layout: single
|----------------------------------|---------------|
| {{< image-versions image="nodejs" status="supported" environment="grid" >}} | {{< image-versions image="nodejs" status="supported" environment="dedicated" >}} |

{{< image-versions-legacy "nodejs" >}}

{{% language-specification type="nodejs" display_name="Node.js" %}}

To use a specific version in a container with a different language, [use a version manager](node-version.md).

{{% deprecated-versions %}}
Expand Down
Loading

0 comments on commit d303de1

Please sign in to comment.