You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ji...@apache.org on 2026/10/10 09:25:15 UTC
(ambari-mpacks) 31/35: AMBARI-26663: Manage MinIO environment content
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ambari-mpacks.git
commit 1e74543e6cb5da12cb56973acaf5c54dd7de935c
Author: jialiang <ji...@gmail.com>
AuthorDate: Mon Sep 28 17:47:57 2026 +0800
AMBARI-26663: Manage MinIO environment content
---
.../MINIO/configuration/minio-environment.xml | 68 +++----------
.../1.0/services/MINIO/package/scripts/runtime.py | 2 +
.../MINIO/1.0/services/MINIO/themes/theme.json | 106 +++++----------------
3 files changed, 39 insertions(+), 137 deletions(-)
diff --git a/mpacks/minio/extensions/MINIO/1.0/services/MINIO/configuration/minio-environment.xml b/mpacks/minio/extensions/MINIO/1.0/services/MINIO/configuration/minio-environment.xml
index 0eb45a8..d921fb6 100644
--- a/mpacks/minio/extensions/MINIO/1.0/services/MINIO/configuration/minio-environment.xml
+++ b/mpacks/minio/extensions/MINIO/1.0/services/MINIO/configuration/minio-environment.xml
@@ -13,61 +13,21 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<configuration>
+<configuration supports_adding_forbidden="true">
<property>
- <name>MINIO_BROWSER</name>
- <display-name>MINIO_BROWSER</display-name>
- <value>on</value>
- <description>Enable the browser console: on or off. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>MINIO_REGION_NAME</name>
- <display-name>MINIO_REGION_NAME</display-name>
- <value>us-east-1</value>
- <description>S3 region name. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>MINIO_API_REQUESTS_MAX</name>
- <display-name>MINIO_API_REQUESTS_MAX</display-name>
- <value>0</value>
- <description>Maximum concurrent API requests; zero uses automatic sizing. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>int</type><minimum>0</minimum></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>MINIO_API_REQUESTS_DEADLINE</name>
- <display-name>MINIO_API_REQUESTS_DEADLINE</display-name>
- <value>10s</value>
- <description>Maximum time requests wait for an execution slot. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>MINIO_COMPRESSION_ENABLE</name>
- <display-name>MINIO_COMPRESSION_ENABLE</display-name>
- <value>off</value>
- <description>Enable compression for eligible objects. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>MINIO_COMPRESSION_EXTENSIONS</name>
- <display-name>MINIO_COMPRESSION_EXTENSIONS</display-name>
- <value>.txt,.log,.csv,.json,.tar,.xml,.bin</value>
- <description>File extensions eligible for compression. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>MINIO_COMPRESSION_MIME_TYPES</name>
- <display-name>MINIO_COMPRESSION_MIME_TYPES</display-name>
- <value>text/*,application/json,application/xml</value>
- <description>MIME types eligible for compression. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
+ <name>content</name>
+ <display-name>minio.env</display-name>
+ <value># Edit the native configuration below. Save a version and restart to apply.
+MINIO_BROWSER='on'
+MINIO_REGION_NAME='us-east-1'
+MINIO_API_REQUESTS_MAX='0'
+MINIO_API_REQUESTS_DEADLINE='10s'
+MINIO_COMPRESSION_ENABLE='off'
+MINIO_COMPRESSION_EXTENSIONS='.txt,.log,.csv,.json,.tar,.xml,.bin'
+MINIO_COMPRESSION_MIME_TYPES='text/*,application/json,application/xml'
+</value>
+ <description>Complete environment configuration. Existing scalar properties are converted using their current values when opening the current configuration version. Management identity and listener settings remain in Basic Settings.</description>
+ <value-attributes><type>content</type><empty-value-valid>true</empty-value-valid><property-file-name>minio.env</property-file-name><property-file-type>environment</property-file-type></value-attributes>
<on-ambari-upgrade add="true"/>
</property>
</configuration>
diff --git a/mpacks/minio/extensions/MINIO/1.0/services/MINIO/package/scripts/runtime.py b/mpacks/minio/extensions/MINIO/1.0/services/MINIO/package/scripts/runtime.py
index cc39715..52211c1 100644
--- a/mpacks/minio/extensions/MINIO/1.0/services/MINIO/package/scripts/runtime.py
+++ b/mpacks/minio/extensions/MINIO/1.0/services/MINIO/package/scripts/runtime.py
@@ -154,6 +154,8 @@ def configure(parameters):
"MINIO_OPTS"} or key.endswith("_FILE") for key in extra):
raise ValueError("MinIO identity, listeners and secret files belong to basic settings")
runtime["environment"] = extra
+ if hasattr(extra, "source"):
+ owned_file(CONF / "minio.env", extra.source, "minio", 0o600)
owned_file(CONF / "runtime.json", json.dumps(runtime, sort_keys=True), "minio", 0o600)
owned_file(CONF / "launcher.py", Path(__file__).with_name("launcher.py").read_text(), "minio", 0o500)
unit("ambari-minio.service", "minio", Path("/usr/libexec/platform-python"),
diff --git a/mpacks/minio/extensions/MINIO/1.0/services/MINIO/themes/theme.json b/mpacks/minio/extensions/MINIO/1.0/services/MINIO/themes/theme.json
index 70d779c..f5f8bb5 100644
--- a/mpacks/minio/extensions/MINIO/1.0/services/MINIO/themes/theme.json
+++ b/mpacks/minio/extensions/MINIO/1.0/services/MINIO/themes/theme.json
@@ -1,31 +1,31 @@
{
"$comment": "Licensed to the Apache Software Foundation (ASF) under one or more\ncontributor license agreements. See the NOTICE file distributed with\nthis work for additional information regarding copyright ownership.\nThe ASF licenses this file to You under the Apache License, Version 2.0\n(the \"License\"); you may not use this file except in compliance with\nthe License. You may obtain a copy of the License at\nhttp://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicab [...]
"name": "default",
- "description": "Basic settings, native tuning and complete configuration files. Custom properties remain available in Advanced.",
+ "description": "Edit complete native configuration files; Basic Settings retains managed topology and credentials.",
"configuration": {
"layouts": [
{
"name": "default",
"tabs": [
{
- "name": "basic",
- "display-name": "Basic Settings",
+ "name": "files",
+ "display-name": "Configuration Files",
"layout": {
"tab-columns": 1,
"tab-rows": 1,
"sections": [
{
- "name": "minio-env",
- "display-name": "minio-env",
+ "name": "minio-environment",
+ "display-name": "minio-environment",
"row-index": 0,
"column-index": 0,
"row-span": 1,
"column-span": 1,
- "section-columns": 1,
"section-rows": 1,
+ "section-columns": 1,
"subsections": [
{
- "name": "minio-env-fields",
+ "name": "minio-environment-fields",
"row-index": 0,
"column-index": 0,
"row-span": 1,
@@ -37,24 +37,24 @@
}
},
{
- "name": "tuning",
- "display-name": "Native Settings",
+ "name": "basic",
+ "display-name": "Basic Settings",
"layout": {
"tab-columns": 1,
"tab-rows": 1,
"sections": [
{
- "name": "minio-environment",
- "display-name": "minio-environment",
+ "name": "minio-env",
+ "display-name": "minio-env",
"row-index": 0,
"column-index": 0,
"row-span": 1,
"column-span": 1,
- "section-columns": 1,
"section-rows": 1,
+ "section-columns": 1,
"subsections": [
{
- "name": "minio-environment-fields",
+ "name": "minio-env-fields",
"row-index": 0,
"column-index": 0,
"row-span": 1,
@@ -71,6 +71,10 @@
"placement": {
"configuration-layout": "default",
"configs": [
+ {
+ "config": "minio-environment/content",
+ "subsection-name": "minio-environment-fields"
+ },
{
"config": "minio-env/server_host",
"subsection-name": "minio-env-fields"
@@ -102,38 +106,16 @@
{
"config": "minio-env/source_url",
"subsection-name": "minio-env-fields"
- },
- {
- "config": "minio-environment/MINIO_BROWSER",
- "subsection-name": "minio-environment-fields"
- },
- {
- "config": "minio-environment/MINIO_REGION_NAME",
- "subsection-name": "minio-environment-fields"
- },
- {
- "config": "minio-environment/MINIO_API_REQUESTS_MAX",
- "subsection-name": "minio-environment-fields"
- },
- {
- "config": "minio-environment/MINIO_API_REQUESTS_DEADLINE",
- "subsection-name": "minio-environment-fields"
- },
- {
- "config": "minio-environment/MINIO_COMPRESSION_ENABLE",
- "subsection-name": "minio-environment-fields"
- },
- {
- "config": "minio-environment/MINIO_COMPRESSION_EXTENSIONS",
- "subsection-name": "minio-environment-fields"
- },
- {
- "config": "minio-environment/MINIO_COMPRESSION_MIME_TYPES",
- "subsection-name": "minio-environment-fields"
}
]
},
"widgets": [
+ {
+ "config": "minio-environment/content",
+ "widget": {
+ "type": "text-area"
+ }
+ },
{
"config": "minio-env/server_host",
"widget": {
@@ -181,48 +163,6 @@
"widget": {
"type": "text-field"
}
- },
- {
- "config": "minio-environment/MINIO_BROWSER",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "minio-environment/MINIO_REGION_NAME",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "minio-environment/MINIO_API_REQUESTS_MAX",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "minio-environment/MINIO_API_REQUESTS_DEADLINE",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "minio-environment/MINIO_COMPRESSION_ENABLE",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "minio-environment/MINIO_COMPRESSION_EXTENSIONS",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "minio-environment/MINIO_COMPRESSION_MIME_TYPES",
- "widget": {
- "type": "text-field"
- }
}
]
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org