In some situations, the Smartfacts server has no access to the internet. In this case, it is not possible to download the needed software and images. This article describes which options we have to install Smartfacts in such scenarios.
Content
Preparations
If not done so far please prepare your infrastructure as described in https://smartfacts.atlassian.net/wiki/spaces/SPD/pages/54624257/Installing+Smartfacts+for+Proof+of+Concepts#Prepare-your-infrastructure.
Download the software
Download “k3s” and “k3s-airgap-images-amd64.tar.gz” from the “Assets” section of https://github.com/k3s-io/k3s/releases
Download the Helm binaries for Linux amd64 from https://github.com/helm/helm/releases
Copy the contents of the K3s install script at https://get.k3s.io into a new text file called “install.sh”
Download the file https://cp.mid.de/releases/smartfacts-air-gapped/install_airgapped_software.sh
Copy the files to the server
Create a new directory “download” in your home directory
Create a new directory “software” under “download”
Copy all downloaded files to ~/download/software
After copying all files, the file structure should look like this:download └── software ├── helm-v3.10.3-linux-amd64.tar.gz ├── install.sh ├── install_airgapped_software.sh ├── k3s └── k3s-airgap-images-amd64.tar.gz
Execute the installation script
In the directory ~/download/software make the install script executeable and execute it:
chmod u+x install_airgapped_software.sh ./install_airgapped_software.sh
Download the Smartfacts Helm Chart
Log into the Smartfacts Chart Registry using the credentials provided and download the latest chart version that does not contain the postfix “-dev”.
Copy the downloaded helm chart to your home directory on the Smartfacts server
Extract the helm chart using the command
tar -xf smartfacts-*.tgz
Create the deployment configuration
Provide Certificates and Key as Base64 String
The Prerequisite is: The complete certificate chain is available in a file as base64-encoded x509 certificates. The certificates are contained in the file in the correct order (server certificate at the top, root certificate at the bottom). See Section “Certificates” above in this article.
Save the certificate chain as a base64-encoded string:
cat <your certificate chain.crt> | base64 -w0 > chain.crt.base64
Save certificate key as a base64-encoded string:
cat <your certificate key.key> | base64 -w0 > key.base64
Customize Values File
Change to the home directory of your user on the server and create a new text file
values.yaml
with the following content:global: domain: "<your-domain>" instance: "smartfacts-poc" registry: "library" cert: crtFullChain: "<FULL-CHAIN-CERT-BASE64>" key: "<CERT-KEY-BASE64>" ingress: enabled: true mailservice: enabled: false genoslc: enabled: false
Replace the value of the property domain with your domain name
Replace the placeholder of the property crtFullChain with the content of the file
chain.crt.base64
Replace the placeholder of the property key with the content of the
key.base64
fileSave the file
values.yaml
Provide the container images
The Kubernetes environment at the Smartfacts server must have access to the Smartfacts container images.
The recommended way to gain access to the container images is to add the Smartfacts registry https://repo.mid.de to an existing container registry in your organisation that has access to the internet. This registry serves as a proxy registry so that the Smartfacts server can load the images through this proxy registry. Follow the instructions in the section Provide container images with a proxy container registry if you can use a proxy registry.
If it is not possible to use a proxy registry, the container images can be loaded directly into the container service of the Smartfacts server. To do this, follow the instructions in the section Provide container images without a container registry.
Install Smartfacts
Execute the Installation
In the user's home directory, enter the following command to execute the Installation:
sudo helm upgrade --install --timeout 15m0s smartfacts ./smartfacts -f values.yaml -n smartfacts --create-namespace
Watch Deployment events (in a new Session)
Open a second session on the server and enter the following command:
sudo watch kubectl get deployments -n smartfacts
Enter the following command to show the URLs (please make sure to prefix it with “https://” in your browser):
sudo kubectl get ingress -n smartfacts
Prepare the Smartfacs Model Warehouse
A note on Smartfacts PoC Test Users
For the Smartfacts PoC you can use the generated test users “poc1”…”poc50”. All poc-users have the same password “poc”. For managing the test users in the CAMP use the account administrator user “acm” which has the password “acm”.
Setting-Up the CAMP (Customer Accounts for MID Products)
This section is used to add the users who will be authorized to use the instance and to assign the licenses. When you open https://camp.<yoursmartfactsdomain>
, and log in with the user “acm” (password “acm”) you will be taken to this page:
In section 1, upload the license file MID has provided in step 4 by clicking the upload button in the upper right-hand corner and by selecting the license file.
In section 2, set an account name.
In section 3, synchronize the users from OpenLDAP to CAMP by clicking UPDATE USERS AND GROUPS.
Assign licenses to users and groups in the CAMP.
Check all users and/or groups that should have a license and assign licenses by clicking ASSIGN LICENSES.
The creation of the account is now complete and licenses are assigned to the users.
Create a Smartfacts Model Warehouse
Open the Smartfacts URL in your browser:
https://smartfacts.<yoursmartfactsdomain>
and log-in with the account manager credentials (user “acm”, password “acm”).You will now be asked to create a Model Warehouse.
Click on CREATE A NEW MODEL WAREHOUSE.
In the create dialog, first select the previously created account.
Provide a name for the Model Warehouse.
Optionally, activate the check box Create Demo Models if you want some demo content to be added to the Model Warehouse.
Model Warehouse creation is the final step in the Smartfacts platform set-up process.
Install the Plug-Ins
It depends on which tools you want to use in connection with Smartfacts. Smartfacts provides a plug-in for every tool which is supported. You can download the plug-ins from the main menu via the command Get Plug-ins.
Troubleshooting
Display events
If the deployments don`t get healthy, you can display the event messages of the installation:
sudo kubectl get events -n smartfacts
These events show some common error conditions (e.g. Images are not found; insufficient ressources)
Add Comment