commit 7ed1bc50e7436a1c6fb1fee4baccb5b72eb6f7cb Author: Eric Yang Date: Mon Sep 18 14:23:08 2017 -0700 YARN-7201. Add an example for Apache, MySQL and PHPMyAdmin. diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/examples/amp/Yarnfile b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/examples/amp/Yarnfile new file mode 100644 index 00000000000..12fe2fef7ef --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/examples/amp/Yarnfile @@ -0,0 +1,73 @@ +{ + "name": "amp", + "organization": "Apache", + "description": "Apache MySQL PHP web application", + "icon": "css/img/feather.png", + "lifetime": "3600", + "components": [ + { + "name": "mysql", + "number_of_containers": 1, + "artifact": { + "id": "localhost:5000/mysql:latest", + "type": "DOCKER" + }, + "launch_command": "", + "resource": { + "cpus": 1, + "memory": "2048" + }, + "configuration": { + "env": { + }, + "files": [ + ] + } + }, + { + "name": "httpd", + "number_of_containers": 1, + "artifact": { + "id": "localhost:5000/httpd:latest", + "type": "DOCKER" + }, + "launch_command": "", + "resource": { + "cpus": 1, + "memory": "2048" + }, + "configuration": { + "env": { + "MOUNTS": "[{ \"source\":\"/mnt/hdfs/user/${USER}/htdocs\", \"target\":\"/usr/local/apache2/htdocs\", \"option\":\"ro\" }]", + "MYSQL_HOST":"mysql.${SERVICE_NAME}.${USER}.${DOMAIN}", + "MYSQL_PORT":"3306" + }, + "files": [ + ] + } + }, + { + "name": "phpmyadmin", + "number_of_containers": 1, + "artifact": { + "id": "localhost:5000/phpmyadmin:latest", + "cpus": 1, + "memory": "2048" + }, + "configuration": { + "env": { + "PMA_HOST":"mysql.${SERVICE_NAME}.${USER}.${DOMAIN}", + "PMA_PORT":"3306", + "PMA_USER":"mysql", + "PMA_PASSWORD":"" + }, + "files": [ + ] + } + } + ], + "quicklinks": { + "Apache Document Root": "http://httpd.${SERVICE_NAME}.${USER}.${DOMAIN}/", + "PHP MyAdmin": "http://phpmyadmin.${SERVICE_NAME}.${USER}.${DOMAIN}:8080/" + } +}