Instructor Installation
Introduction
The Instructor service provides the ApiOmat documentation via a unrestricted HTTP interface. It is available via
http://HOSTNAME:8093/docs
This service is included in YAMBAS until version 3.2. Afterwards, it needs to be installed by hand or via ApiOmat Meta Packages.
Prerequisites
Open the following port in the firewall to other ApiOmat nodes:
-
8093 (HTTP)
Installation of Consul is required!
Installation of AdoptOpenJDK is required when not using Docker!
System requirements
The following instance configurations are recommended.
|
Size |
CPU |
Memory |
Disk |
Typical Cloud Instance Types |
|
All |
2 core |
1 GB RAM |
500 MB |
AWS: t2.medium |
|
|
|
|
|
Azure: Standard_ B1MS |
Installation
USERNAME, PASSWORD, and TOKEN values are provided per customer from ApiOmat.
# Install the repo keywget -O - https://repo-int.apiomat.com/yambas/rest/web/Key/LIVE/apiomat-archive-keyring.asc | sudo apt-key add -# Add the repositoryecho "deb https://<USERNAME>:<PASSWORD>@repo.apiomat.com/yambas/rest/web/Repo/LIVE/deb ./" | sudo tee /etc/apt/sources.list.d/apiomat.list# Update APT and installapt-get updateapt-get install -y aom-instructorservice instructor start# Add the repositoryecho "[apiomat]name=ApiOmatbaseurl=https://<USERNAME>:<PASSWORD>@repo.apiomat.com/yambas/rest/web/Repo/LIVE/rpmgpgcheck=0enabled=1" > /etc/yum.repos.d/apiomat.repo# Installyum -y --nogpgcheck install aom-instructorservice instructor start# Add the repositoryzypper addrepo --no-gpgcheck https://repo.apiomat.com/yambas/rest/web/Repo/LIVE/suse?token=<TOKEN> "ApiOmat"# Refresh zypper and installzypper refreshzypper --no-gpg-checks --non-interactive install aom-instructorservice instructor start# Docker logindocker login -u <USERNAME> -p <PASSWORD># Store the following file and execute:docker-compose -f instructor.yml upinstructor.yml:
version: '3'services: instructor: image: apiomat/instructor:<VERSION> command: --spring.cloud.consul.enabled=false ports: - "8093:8093"# Docker loginkubectl create secret docker-registry regcred \ --docker-server=https://index.docker.io/v1/ \ --docker-username="<USERNAME>" \ --docker-password="<PASSWORD>" \ --docker-email="<MAIL>"# Store the following file and executekubectl apply -f instructor.ymlinstructor.yml:
---# Source: apiomat-instructor/templates/service.yamlkind: ServiceapiVersion: v1metadata: name: release-name-apiomat-instructor labels: app: apiomat-instructor chart: apiomat-instructor-1.1.0 release: "release-name" heritage: "Tiller"spec: ports: - name: http port: 8093 protocol: TCP type: NodePort selector: app: apiomat-instructor release: release-name---# Source: apiomat-instructor/templates/deployment.yamlapiVersion: apps/v1kind: Deploymentmetadata: labels: app: apiomat-instructor chart: apiomat-instructor-1.1.0 heritage: Tiller release: release-name name: release-name-apiomat-instructorspec: replicas: 1 selector: matchLabels: app: apiomat-instructor chart: apiomat-instructor-1.1.0 release: release-name template: metadata: labels: app: apiomat-instructor chart: apiomat-instructor-1.1.0 release: release-name spec: imagePullSecrets: - name: <regcred> containers: - name: apiomat-instructor image: docker.io/apiomat/instructor:1.1.0 command: - --spring.cloud.consul.enabled=false ports: - containerPort: 8093 name: ms-port resources: limits: memory: 1Gi requests: memory: 1Gi livenessProbe: httpGet: path: /docs port: 8093 initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 6 readinessProbe: httpGet: path: /docs port: 8093 initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 6 imagePullPolicy: Always securityContext: capabilities: { } privileged: false---# Source: apiomat-instructor/templates/ingress.yamlapiVersion: extensions/v1beta1kind: Ingressmetadata: name: release-name-apiomat-instructor labels: app: apiomat-instructor chart: apiomat-instructor-1.1.0 release: release-name heritage: Tillerspec: rules: - host: "instructor.example.domain" http: paths: - path: / backend: serviceName: release-name-apiomat-instructor servicePort: ms-port---# Source: apiomat-instructor/templates/requirements.yaml# Docker loginkubectl create secret docker-registry regcred \ --docker-server=https://index.docker.io/v1/ \ --docker-username="<USERNAME>" \ --docker-password="<PASSWORD>" \ --docker-email="<MAIL>"# We are using helm to deploy the yambas replicaset helm inithelm repo updatehelm repo add apiomat https://apinautengmbh.github.io/helm/helm fetch apiomat/apiomat-instructor # extract the archive (.tgz) and find the values.yml. Adjust the parameters as required. helm install apiomat/apiomat-instructor --name apiomat-instructor --values values.yaml-
Download file: https://repo.apiomat.com/yambas/rest/web/Repo/LIVE/aom-instructor-<VERSION>.zip?token=<TOKEN> and unzip to installation folder
-
Ensure that the path to your installed jdk\bin is set to the system-environment variable 'Path' (java.exe needs to be accessible for windows' system user!)
-
Open administrative console and execute
Instructor-<VERSION>.exe install
Instructor-<VERSION>.exe start
to install as service and start afterwards.
For a removal of the service, execute
Instructor-<VERSION>.exe uninstall
Configuration
General service configuration possibilities are described at the configurations main page. This services does not provide any special configuration.
Logging
Logging is done to a separate logfile:
tail -f /var/log/apiomat/instructor.logPlease replace <INSTRUCTOR_CONTAINER_ID> with your running container ID. You can list your running container using 'docker container list' command.
docker logs -f <INSTRUCTOR_CONTAINER_ID>Please replace <INSTRUCTOR_CONTAINER_ID> with your running container ID. You can list your running container using 'kubectl get pods' command.
kubectl logs -f <INSTRUCTOR_CONTAINER_ID>All logs are written to Event manager.
Next steps
Install further microservices.