Difference between revisions of "Install Ghost on OKD4x"
Jump to navigation
Jump to search
(Created page with "Ghost blog software became pretty popular this days.<br> If you have a kubernetes cluster around, you can install it within seconds.<br> Here we go with OKD 4.10<br> =ENVIRON...") |
|||
| Line 20: | Line 20: | ||
=DEPLOY DATABASE= | =DEPLOY DATABASE= | ||
| − | oc process -n openshift mariadb-persistent MYSQL_DATABASE=$PROJECT MYSQL_USER=$PROJECT MYSQL_PASSWORD=$DB_PASS VOLUME_CAPACITY=5Gi | oc create -f - | + | oc process -n openshift mariadb-persistent MYSQL_DATABASE=$PROJECT MYSQL_USER=$PROJECT MYSQL_PASSWORD=$DB_PASS VOLUME_CAPACITY=5Gi | oc create -f - |
| + | |||
| + | [[Category:4x]] | ||
| + | [[Category:OpenShift & K8S]] | ||
=DEPLOY APPLICATION= | =DEPLOY APPLICATION= | ||
Revision as of 04:33, 22 April 2022
Ghost blog software became pretty popular this days.
If you have a kubernetes cluster around, you can install it within seconds.
Here we go with OKD 4.10
1 ENVIRONMENT
genpasswd() {
local l=$1
[ "$l" == "" ] && l=16
tr -dc A-Za-z0-9_=%.,: < /dev/urandom | head -c ${l} | xargs
}
PROJECT=ghost
URL=$PROJECT.domain.com
IMG=ghost:latest
DB_PASS=$(genpasswd)
oc new-project $PROJECT
2 DEPLOY DATABASE
oc process -n openshift mariadb-persistent MYSQL_DATABASE=$PROJECT MYSQL_USER=$PROJECT MYSQL_PASSWORD=$DB_PASS VOLUME_CAPACITY=5Gi | oc create -f -
3 DEPLOY APPLICATION
oc new-app --name $PROJECT --image $IMG \
database__client=mysql \
database__connection__host=mariadb \
database__connection__user=$PROJECT \
database__connection__password=$DB_PASS \
database__connection__database=$PROJECT \
url=https://$URL
4 CREATE ROUTE
oc create route edge --service=ghost --hostname=$URL