Quick start a new Ibexa project¶
Copy php source code¶
Skip this step if you have already a git repository with your php source code.
Enter the console of your frontend pod after install.
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git init --initial-branch=main
git remote add origin git@gitlab.com:myproject/myproject.git https://gituser:gitpassword@domain.xxx
git add .
git commit -m "Initial commit"
git push -u origin main
Configure your Ibexa project¶
In order to configure Ibexa for you chart there are no additional settings needed, if your current has no additional configurations. Nevertheless there are some thing worth mentioning.
Redis cluster sessions¶
Redis cluster session settings are injected via ENV variables, you have configured sessions before inside Ibexa you need to apply the default settings.
Build a container¶
From your sources from this Container file. Place it in the root of your ibexa project. The container base image is created in this s2i-php project that will ship your constant updates.
For more details read the s2i php documentation.
FROM registry.gitlab.com/xrow-public/s2i-php/ibexa-c10s-8.3:1.0.1
ARG COMPOSER_AUTH
ENV CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
ENV CI_COMMIT_REF_SLUG=3-12-0
ENV CI_COMMIT_REF_NAME=3.12.0
ENV CI_COMMIT_SHA=2aed96061b4351de10b718c7f5bf57e47f39bfa6
ENV CI_COMMIT_SHORT_SHA=2aed9606
ENV CI_COMMIT_TAG=3.12.0
ENV GIT_SSH_COMMAND="ssh -vvv -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null"
# Add application sources to a directory that the assemble script expects them
# and set permissions so that the container runs without root access
USER 0
ADD . /tmp/src
RUN chown -R 1001:0 /tmp/src
USER 1001
# Install the dependencies
RUN /usr/libexec/s2i/assemble
RUN echo "Build with $(cat /etc/redhat-release)"
# Set the default command for the resulting image
CMD /usr/libexec/s2i/run
Now build and push the image to a registry or create a automated pipeline.
Here is a example for GitLab: Add a file .gitlab-ci.yml
to the root of your git project.
variables:
# Grant access to ibexa sources
COMPOSER_AUTH: '{"http-basic":{"updates.ibexa.co": {"username": "<your-ibexa-key>", "password": "<your-ibexa-password>"}}}'
include:
- component: gitlab.com/xrow-public/ci-tools/common@main
- component: gitlab.com/xrow-public/ci-tools/workflow@main
- component: gitlab.com/xrow-public/ci-tools/container@main
inputs:
path: .
name: ibexa
args: "COMPOSER_AUTH"
Create a deploy token for your registry and give it read_registry
permissions for GitLab or GitHub.
Deploy your Ibexa DXP project to kubernetes¶
See the full parameter configuration guide.
In this example we will replace the default container image with our custom build. Replace the values with your own settings.
Create the file deploy/production.yaml
with the contents of your values.yaml
.
global:
routes:
frontend:
- www.example.com
admin:
- admin.example.com
image:
registry: my.registry.com
repository: path/to/ibexa
tag: latest
imageCredentials:
registry: my.registry.com
username: <REGISTRY_USER>
password: <REGISTRY_PASSWORD>
vendor:
imageCredentials:
username: <XROW_LICENCE_USER>
password: <XROW_LICENCE_KEY>
storage:
# Your storage class capable of RWX, other volumes will use the default storage class
class: <default-storage-rwx>
Setup the licence key and authenticate
Run helm for deployment
helm upgrade --install ibexa oci://registry.gitlab.com/xrow-share/repository/charts/ibexa \
--version 3.12.0 \
--file deploy/production.yaml
--namespace ibexa-production \
--create-namespace --atomic --wait --debug --timeout 15m
Feel free to inspect the example project.