summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstartxfr <clarue@startx.fr>2017-07-23 16:25:23 +0200
committerstartxfr <clarue@startx.fr>2017-07-23 16:25:23 +0200
commita0fb843bdcfc7f917438fe76c8bb01db087bd60b (patch)
tree61abebdb2f0981cb4e6518b4d6f784aec69685a2
parente69891ce630b7f4d6ea1ee7b2abde0cdf942f6c1 (diff)
downloadphpmyadmin-a0fb843bdcfc7f917438fe76c8bb01db087bd60b.tar.gz
phpmyadmin-a0fb843bdcfc7f917438fe76c8bb01db087bd60b.tar.bz2
phpmyadmin-a0fb843bdcfc7f917438fe76c8bb01db087bd60b.tar.xz
phpmyadmin-a0fb843bdcfc7f917438fe76c8bb01db087bd60b.zip
change in phpmyadmin for openshift
-rw-r--r--Applications/phpmyadmin/Dockerfile22
-rw-r--r--Applications/phpmyadmin/config.inc.php24
-rw-r--r--Bombs/cpu/openshift-template.yml205
-rw-r--r--Bombs/cpu/sx.sh2
-rw-r--r--Bombs/mem/sx.sh2
-rw-r--r--OS/sx.sh2
6 files changed, 237 insertions, 20 deletions
diff --git a/Applications/phpmyadmin/Dockerfile b/Applications/phpmyadmin/Dockerfile
index 855e1ad..57533e9 100644
--- a/Applications/phpmyadmin/Dockerfile
+++ b/Applications/phpmyadmin/Dockerfile
@@ -1,13 +1,19 @@
-FROM startx/sv-php
+FROM centos/php-70-centos7:latest
MAINTAINER Christophe LARUE <dev@startx.fr>
+USER root
+ENV APP_PATH=/opt/app-root/src
RUN cd $APP_PATH && \
- wget -q https://files.phpmyadmin.net/phpMyAdmin/4.5.2/phpMyAdmin-4.5.2-all-languages.zip && \
- unzip phpMyAdmin-4.5.2-all-languages.zip && \
- rm -f phpMyAdmin-4.5.2-all-languages.zip && \
- mv phpMyAdmin-4.5.2-all-languages/* ./ && \
- rm -rf phpMyAdmin-4.5.2-all-languages
+ wget -q https://files.phpmyadmin.net/phpMyAdmin/4.7.3/phpMyAdmin-4.7.3-all-languages.zip && \
+ unzip phpMyAdmin-4.7.3-all-languages.zip && \
+ rm -f phpMyAdmin-4.7.3-all-languages.zip && \
+ mv phpMyAdmin-4.7.3-all-languages/* ./ && \
+ rm -rf phpMyAdmin-4.7.3-all-languages && \
+ rm -f config.sample.inc.php && \
+ chown -R 1001:0 $APP_PATH && \
+ chmod -R ug+rwx $APP_PATH
COPY config.inc.php $APP_PATH/config.inc.php
-EXPOSE 80 443
-CMD [ "/bin/run.sh" ] \ No newline at end of file
+USER 1001
+EXPOSE 8080
+CMD $STI_SCRIPTS_PATH/run \ No newline at end of file
diff --git a/Applications/phpmyadmin/config.inc.php b/Applications/phpmyadmin/config.inc.php
index 110f2aa..eadbfcf 100644
--- a/Applications/phpmyadmin/config.inc.php
+++ b/Applications/phpmyadmin/config.inc.php
@@ -1,20 +1,20 @@
<?php
-
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
- * or at <http://docs.phpmyadmin.net/>.
+ * or at <https://docs.phpmyadmin.net/>.
*
* @package PhpMyAdmin
*/
+
/**
* This is needed for cookie based authentication to encrypt password in
- * cookie
+ * cookie. Needs to be 32 chars long.
*/
-$cfg['blowfish_secret'] = 'SECRET'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$cfg['blowfish_secret'] = 'SECRET^Ù^sdÙq56s,d46?qsd,6q#d7ù6$d465fg4,,f6g;8!sdfs6'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$cfg['PmaNoRelation_DisableWarning'] = true;
/**
@@ -26,13 +26,15 @@ $i = 0;
* First server
*/
if(getenv('MARIADB_ENV_MYSQL_USER') != '') {
- $i++;
+$i++;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = getenv('MARIADB_PORT_3306_TCP_ADDR');
$cfg['Servers'][$i]['port'] = getenv('MARIADB_PORT_3306_TCP_PORT');
$cfg['Servers'][$i]['user'] = getenv('MARIADB_ENV_MYSQL_USER');
$cfg['Servers'][$i]['password'] = getenv('MARIADB_ENV_MYSQL_PASSWORD');
+ $cfg['Servers'][$i]['compress'] = false;
+ $cfg['Servers'][$i]['AllowNoPassword'] = false;
}
if(getenv('MARIADB2_ENV_MYSQL_USER') != '') {
@@ -43,6 +45,8 @@ if(getenv('MARIADB2_ENV_MYSQL_USER') != '') {
$cfg['Servers'][$i]['port'] = getenv('MARIADB2_PORT_3306_TCP_PORT');
$cfg['Servers'][$i]['user'] = getenv('MARIADB2_ENV_MYSQL_USER');
$cfg['Servers'][$i]['password'] = getenv('MARIADB2_ENV_MYSQL_PASSWORD');
+ $cfg['Servers'][$i]['compress'] = false;
+ $cfg['Servers'][$i]['AllowNoPassword'] = false;
}
if(getenv('DB_ENV_MYSQL_USER') != '') {
@@ -53,10 +57,13 @@ if(getenv('DB_ENV_MYSQL_USER') != '') {
$cfg['Servers'][$i]['port'] = getenv('DB_PORT_3306_TCP_PORT');
$cfg['Servers'][$i]['user'] = getenv('DB_ENV_MYSQL_USER');
$cfg['Servers'][$i]['password'] = getenv('DB_ENV_MYSQL_PASSWORD');
+ $cfg['Servers'][$i]['compress'] = false;
+ $cfg['Servers'][$i]['AllowNoPassword'] = false;
}
/**
* phpMyAdmin configuration storage settings.
*/
+
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
@@ -84,12 +91,11 @@ if(getenv('DB_ENV_MYSQL_USER') != '') {
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
-/* Contrib / Swekey authentication */
-// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
/**
* End of servers configuration
*/
+
/**
* Directories for saving/loading files from server
*/
@@ -172,5 +178,5 @@ $cfg['SaveDir'] = '';
/**
* You can find more configuration options in the documentation
- * in the doc/ folder or at <http://docs.phpmyadmin.net/>.
- */
+ * in the doc/ folder or at <https://docs.phpmyadmin.net/>.
+ */ \ No newline at end of file
diff --git a/Bombs/cpu/openshift-template.yml b/Bombs/cpu/openshift-template.yml
new file mode 100644
index 0000000..168e2cc
--- /dev/null
+++ b/Bombs/cpu/openshift-template.yml
@@ -0,0 +1,205 @@
+apiVersion: v1
+kind: Template
+metadata:
+ creationTimestamp: null
+ name: startx-bomb-cpu
+objects:
+- apiVersion: v1
+ kind: ImageStream
+ metadata:
+ creationTimestamp: null
+ generation: 2
+ labels:
+ app: openshift-bomb-cpu
+ name: openshift-bomb-cpu
+ spec:
+ tags:
+ - annotations:
+ openshift.io/generated-by: STARTX
+ openshift.io/imported-from: startx/openshift-bomb-cpu
+ from:
+ kind: DockerImage
+ name: 172.30.213.210:5000/demo/openshift-bomb-cpu:latest
+ generation: 2
+ importPolicy: {}
+ name: latest
+ referencePolicy:
+ type: Source
+ status:
+ dockerImageRepository: ""
+- apiVersion: v1
+ kind: DeploymentConfig
+ metadata:
+ annotations:
+ openshift.io/generated-by: STARTX
+ creationTimestamp: null
+ generation: 1
+ labels:
+ app: openshift-bomb-cpu
+ name: openshift-bomb-cpu
+ spec:
+ replicas: 0
+ selector:
+ app: openshift-bomb-cpu
+ deploymentconfig: openshift-bomb-cpu
+ strategy:
+ activeDeadlineSeconds: 21600
+ recreateParams:
+ timeoutSeconds: 60
+ resources: {}
+ type: Recreate
+ template:
+ metadata:
+ annotations:
+ openshift.io/generated-by: STARTX
+ creationTimestamp: null
+ labels:
+ app: openshift-bomb-cpu
+ deploymentconfig: openshift-bomb-cpu
+ spec:
+ containers:
+ - image: startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05
+ imagePullPolicy: Always
+ livenessProbe:
+ exec:
+ command:
+ - /bin/bash
+ failureThreshold: 3
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ name: openshift-bomb-cpu
+ readinessProbe:
+ exec:
+ command:
+ - /bin/bash
+ - echo 'ok'
+ failureThreshold: 3
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 5
+ resources: {}
+ terminationMessagePath: /dev/termination-log
+ dnsPolicy: ClusterFirst
+ restartPolicy: Always
+ securityContext: {}
+ terminationGracePeriodSeconds: 30
+ test: false
+ triggers:
+ - imageChangeParams:
+ automatic: true
+ containerNames:
+ - openshift-bomb-cpu
+ from:
+ kind: ImageStreamTag
+ name: openshift-bomb-cpu:latest
+ namespace: demo
+ type: ImageChange
+ status:
+ availableReplicas: 0
+ latestVersion: 0
+ observedGeneration: 0
+ replicas: 0
+ unavailableReplicas: 0
+ updatedReplicas: 0
+- apiVersion: v1
+ kind: ReplicationController
+ metadata:
+ annotations:
+ kubectl.kubernetes.io/original-replicas: "1"
+ openshift.io/deployer-pod.name: openshift-bomb-cpu-1-deploy
+ openshift.io/deployment-config.latest-version: "1"
+ openshift.io/deployment-config.name: openshift-bomb-cpu
+ openshift.io/deployment.phase: Complete
+ openshift.io/deployment.replicas: "1"
+ openshift.io/deployment.status-reason: image change
+ openshift.io/encoded-deployment-config: |
+ {"kind":"DeploymentConfig","apiVersion":"v1","metadata":{"name":"openshift-bomb-cpu","namespace":"demo","selfLink":"/oapi/v1/namespaces/demo/deploymentconfigs/openshift-bomb-cpu","uid":"b1f1d05d-6fa3-11e7-8fae-061a17d00c5c","resourceVersion":"96725","generation":2,"creationTimestamp":"2017-07-23T12:37:31Z","labels":{"app":"openshift-bomb-cpu"},"annotations":{"openshift.io/generated-by":"STARTX"}},"spec":{"strategy":{"type":"Rolling","rollingParams":{"updatePeriodSeconds":1,"intervalSeconds":1,"timeoutSeconds":600,"maxUnavailable":"25%","maxSurge":"25%"},"resources":{},"activeDeadlineSeconds":21600},"triggers":[{"type":"ConfigChange"},{"type":"ImageChange","imageChangeParams":{"automatic":true,"containerNames":["openshift-bomb-cpu"],"from":{"kind":"ImageStreamTag","namespace":"demo","name":"openshift-bomb-cpu:latest"},"lastTriggeredImage":"startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05"}}],"replicas":1,"test":false,"selector":{"app":"openshift-bomb-cpu","deploymentconfig":"openshift-bomb-cpu"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"openshift-bomb-cpu","deploymentconfig":"openshift-bomb-cpu"},"annotations":{"openshift.io/generated-by":"STARTX"}},"spec":{"containers":[{"name":"openshift-bomb-cpu","image":"startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05","resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","securityContext":{}}}},"status":{"latestVersion":1,"observedGeneration":1,"replicas":0,"updatedReplicas":0,"availableReplicas":0,"unavailableReplicas":0,"details":{"message":"image change","causes":[{"type":"ImageChange","imageTrigger":{"from":{"kind":"ImageStreamTag","namespace":"demo","name":"openshift-bomb-cpu:latest"}}}]},"conditions":[{"type":"Available","status":"False","lastUpdateTime":"2017-07-23T12:37:31Z","lastTransitionTime":"2017-07-23T12:37:31Z","message":"Deployment config does not have minimum availability."}]}}
+ creationTimestamp: null
+ generation: 1
+ labels:
+ app: openshift-bomb-cpu
+ openshift.io/deployment-config.name: openshift-bomb-cpu
+ name: openshift-bomb-cpu-1
+ spec:
+ replicas: 0
+ selector:
+ app: openshift-bomb-cpu
+ deployment: openshift-bomb-cpu-1
+ deploymentconfig: openshift-bomb-cpu
+ template:
+ metadata:
+ annotations:
+ openshift.io/deployment-config.latest-version: "1"
+ openshift.io/deployment-config.name: openshift-bomb-cpu
+ openshift.io/deployment.name: openshift-bomb-cpu-1
+ openshift.io/generated-by: STARTX
+ creationTimestamp: null
+ labels:
+ app: openshift-bomb-cpu
+ deployment: openshift-bomb-cpu-1
+ deploymentconfig: openshift-bomb-cpu
+ spec:
+ containers:
+ - image: startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05
+ imagePullPolicy: Always
+ name: openshift-bomb-cpu
+ resources: {}
+ terminationMessagePath: /dev/termination-log
+ dnsPolicy: ClusterFirst
+ restartPolicy: Always
+ securityContext: {}
+ terminationGracePeriodSeconds: 30
+ status:
+ replicas: 0
+- apiVersion: v1
+ kind: ReplicationController
+ metadata:
+ annotations:
+ openshift.io/deployer-pod.name: openshift-bomb-cpu-2-deploy
+ openshift.io/deployment-config.latest-version: "2"
+ openshift.io/deployment-config.name: openshift-bomb-cpu
+ openshift.io/deployment.phase: Complete
+ openshift.io/deployment.replicas: ""
+ openshift.io/deployment.status-reason: image change
+ openshift.io/encoded-deployment-config: |
+ {"kind":"DeploymentConfig","apiVersion":"v1","metadata":{"name":"openshift-bomb-cpu","namespace":"demo","selfLink":"/oapi/v1/namespaces/demo/deploymentconfigs/openshift-bomb-cpu","uid":"b1f1d05d-6fa3-11e7-8fae-061a17d00c5c","resourceVersion":"96856","generation":3,"creationTimestamp":"2017-07-23T12:37:31Z","labels":{"app":"openshift-bomb-cpu"},"annotations":{"openshift.io/generated-by":"STARTX"}},"spec":{"strategy":{"type":"Rolling","rollingParams":{"updatePeriodSeconds":1,"intervalSeconds":1,"timeoutSeconds":600,"maxUnavailable":"25%","maxSurge":"25%"},"resources":{},"activeDeadlineSeconds":21600},"triggers":[{"type":"ConfigChange"},{"type":"ImageChange","imageChangeParams":{"automatic":true,"containerNames":["openshift-bomb-cpu"],"from":{"kind":"ImageStreamTag","namespace":"demo","name":"openshift-bomb-cpu:latest"},"lastTriggeredImage":"startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05"}}],"replicas":1,"test":false,"selector":{"app":"openshift-bomb-cpu","deploymentconfig":"openshift-bomb-cpu"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"openshift-bomb-cpu","deploymentconfig":"openshift-bomb-cpu"},"annotations":{"openshift.io/generated-by":"STARTX"}},"spec":{"containers":[{"name":"openshift-bomb-cpu","image":"startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05","resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","securityContext":{}}}},"status":{"latestVersion":2,"observedGeneration":2,"replicas":1,"updatedReplicas":1,"availableReplicas":1,"unavailableReplicas":0,"details":{"message":"image change","causes":[{"type":"ImageChange","imageTrigger":{"from":{"kind":"ImageStreamTag","namespace":"demo","name":"openshift-bomb-cpu:latest"}}}]},"conditions":[{"type":"Progressing","status":"True","lastUpdateTime":"2017-07-23T12:37:43Z","lastTransitionTime":"2017-07-23T12:37:34Z","reason":"NewReplicationControllerAvailable","message":"replication controller \"openshift-bomb-cpu-1\" successfully rolled out"},{"type":"Available","status":"True","lastUpdateTime":"2017-07-23T12:39:08Z","lastTransitionTime":"2017-07-23T12:39:08Z","message":"Deployment config has minimum availability."}],"readyReplicas":1}}
+ creationTimestamp: null
+ generation: 1
+ labels:
+ app: openshift-bomb-cpu
+ openshift.io/deployment-config.name: openshift-bomb-cpu
+ name: openshift-bomb-cpu-2
+ spec:
+ replicas: 0
+ selector:
+ app: openshift-bomb-cpu
+ deployment: openshift-bomb-cpu-2
+ deploymentconfig: openshift-bomb-cpu
+ template:
+ metadata:
+ annotations:
+ openshift.io/deployment-config.latest-version: "2"
+ openshift.io/deployment-config.name: openshift-bomb-cpu
+ openshift.io/deployment.name: openshift-bomb-cpu-2
+ openshift.io/generated-by: STARTX
+ creationTimestamp: null
+ labels:
+ app: openshift-bomb-cpu
+ deployment: openshift-bomb-cpu-2
+ deploymentconfig: openshift-bomb-cpu
+ spec:
+ containers:
+ - image: startx/openshift-bomb-cpu@sha256:83e9eca0e351c60bf3c9755f80846c815045c7963d44b83ea5489cbe8cd21f05
+ imagePullPolicy: Always
+ name: openshift-bomb-cpu
+ resources: {}
+ terminationMessagePath: /dev/termination-log
+ dnsPolicy: ClusterFirst
+ restartPolicy: Always
+ securityContext: {}
+ terminationGracePeriodSeconds: 30
+ status:
+ replicas: 0
diff --git a/Bombs/cpu/sx.sh b/Bombs/cpu/sx.sh
index e028787..6e43335 100644
--- a/Bombs/cpu/sx.sh
+++ b/Bombs/cpu/sx.sh
@@ -7,7 +7,7 @@ function display_container_header {
echo "| Container : $HOSTNAME"
echo "| OS : $(</etc/redhat-release)"
echo "| kubernetes : $KUBERNETES_SERVICE_HOST"
- echo "| user : $(</etc/whoami)"
+ echo "| user : $(whoami)"
echo "+====================================================="
}
diff --git a/Bombs/mem/sx.sh b/Bombs/mem/sx.sh
index f607a0f..bc99504 100644
--- a/Bombs/mem/sx.sh
+++ b/Bombs/mem/sx.sh
@@ -7,7 +7,7 @@ function display_container_header {
echo "| Container : $HOSTNAME"
echo "| OS : $(</etc/redhat-release)"
echo "| kubernetes : $KUBERNETES_SERVICE_HOST"
- echo "| user : $(</etc/whoami)"
+ echo "| user : $(whoami)"
echo "+====================================================="
}
diff --git a/OS/sx.sh b/OS/sx.sh
index 5bf4d17..6dfe719 100644
--- a/OS/sx.sh
+++ b/OS/sx.sh
@@ -7,7 +7,7 @@ function display_container_header {
echo "| Container : $HOSTNAME"
echo "| OS : $(</etc/redhat-release)"
echo "| kubernetes : $KUBERNETES_SERVICE_HOST"
- echo "| user : $(</etc/whoami)"
+ echo "| user : $(whoami)"
echo "+====================================================="
}