Installation¶
Warning
The installation process is also very basic at the moment. So for example only self-signed certificates are used at the moment. Because of this the given SDK also has a problem to connect correctly to these installation currently.
On Kubernetes¶
For the installation on a kubernetes helm
is used.
Supported versions |
---|
Requirements¶
-
Kubernetes
No specific version a the moment known. There are no special features used at the moment, so any version, which is not EOL should work.
-
Helm
-
Cert-Manager
Installation:
-
Node label
To all avaialbe nodes, where it is allowed to be deployed, the label
hanami-node
must be assignedInfo
At the moment OpenHanami is only a single-node application. This will change in the near future, but at the moment it doesn't make sense to label more than one node.
Installation¶
From repository
git clone https://github.com/kitsudaiki/OpenHanami.git
cd OpenHanami/deploy/k8s
helm install \
--set docker.tag=DOCKER_IMAGE_TAG \
--set user.id=USER_ID \
--set user.name=USER_NAME \
--set user.pw=PASSWORD \
--set token.pw=TOKEN_KEY \
--set api.domain=DOMAIN_NAME \
openhanami \
./openhanami/
From pre-build
Download the helm-chart from the file-share
helm install \
--set docker.tag=DOCKER_IMAGE_TAG \
--set user.id=USER_ID \
--set user.name=USER_NAME \
--set user.pw=PASSWORD \
--set token.pw=TOKEN_KEY \
--set api.domain=DOMAIN_NAME \
openhanami \
openhanami-x.y.z.tgz
The --set
-flag defining the login-information for the initial admin-user of the instance:
-
USER_ID
- Identifier for the new user. It is used for login and internal references to the user.
- String, which MUST match the regex
[a-zA-Z][a-zA-Z_0-9@]*
with between4
and256
characters length
-
USER_NAME
- Better readable name for the user, which doesn't have to be unique in the system.
- String, which MUST match the regex
[a-zA-Z][a-zA-Z_0-9 ]*
with between4
and256
characters length
-
PASSWORD
- Password for the initial user
- String, with between
8
and4096
characters length
-
TOKEN_KEY
- Key for the JWT-Tokens
- String
-
DOMAIN_NAME
- Domain for https-access. Per default it is
local-hanami
- String
- Domain for https-access. Per default it is
-
DOCKER_IMAGE_TAG
- Docker-tag used from docker-hub
- String
After a successful installation the USER_ID
and PASSWORD
have to be used for login to the
system.
Using¶
-
check if all pods are running
-
get IP-address
-
add domain with ip to
/etc/hosts
-
use the address in your browser:
https://DOMAIN_NAME
-
login with
USER_ID
andPASSWORD
Note
Persistent data of hanami (checkpoints and so on) within the pod are mounted into the host directory
/etc/openhanami_data
, in case you want to save or delete them.
With Ansible¶
Requirements¶
-
Only Ansible itself is required to be installed
-
Other dependencies like docker will be installed by the ansible playbooks, so it is required that playbooks can be executed with sudo permissions
Environment Variables¶
Basic parameter have to be set by environemt-variables:
-
ADMIN_USER_ID
- Identifier for the new user. It is used for login and internal references to the user.
- String, which MUST match the regex
[a-zA-Z][a-zA-Z_0-9@]*
with between4
and256
characters length
-
ADMIN_USER_NAME
- Better readable name for the user, which doesn't have to be unique in the system.
- String, which MUST match the regex
[a-zA-Z][a-zA-Z_0-9 ]*
with between4
and256
characters length
-
ADMIN_PASSWORD
- Password for the initial user
- String, with between
8
and4096
characters length
-
TOKEN_KEY
- Key for the JWT-Tokens
- String
Example
Run¶
Run in the root of the repository:
cd deploy/ansible/
ansible-playbook --connection=local -i openhanami/inventory.yml openhanami/deploy.yml
The resulting setup will listen on 0.0.0.0
and port 443
and 80
.
Testing¶
The playbooks can be tested with vagrant
apt-get install vagrant virtualbox
vagrant plugin install vagrant-env
vagrant plugin install vagrant-vbguest
The environment variables also must be set in this case with the initial admin credentials.
Run in the root of the repository:
It will create a virtualbox-VM with ubuntu 22.04 and automatically deploy OpenHanami with the ansible-playbook.