On-Premises
In this section, we will guide you through the declaration of a completely functional on-prem infrastructure.
1. Install your server
Install your Linux server on-premises as per your needs and company standards.
Get the IP address of your server, we will need it later.
The YaK needs a user that can use
sudo
without password.Create a dedicated user on your server, this user will be used by the YaK for configuration and deployment purpose (we usually create a user "yak", but this is totally up to you).
Create the .ssh folder for this user and change folder permissions.
Add this user to the list of sudoers, here is an example of how to accomplish that:
2. Declare and exchange SSH keys
In order to connect securely to the Linux targets and deploy components, a pair of SSH keys must be generated and the private SSH key must be given to the YaK.
Generate a SSH key
Linux users:
SSH keys can be generated from any Linux distribution running openSSH with the "ssh-keygen" command:
Windows users:
PuTTYgen can be used to generate private and public SSH keys on Windows. The keys must respect the following characteristics:
number of bits: 4096
type of key to generate: rsa
no passphrase
Copy the content of the private key file:
From the YaK UI, navigate to Configuration > Secrets > Declare
Give an explicit name to your secret, select type "ssh key" and paste the entirety of the private key into the corresponding field of the form.
Click "Save".
Copy the public file to your target server.
Linux users:
Copy the public key to your target server.
Windows users:
Copy the public key generated with PuTTYgen to your target server:
Use your preferred text editor to create and/or open the authorized_keys file.
Paste the content of the public key into the authorized_keys file.
Save the file and close the text editor.
Adjust the permissions of the authorized_keys file.
3. Declare your infrastructure
From the menu, navigate to "Infrastructures".
Click the "declare" button.
Select your provider ("On premises" in the present example).
Click "Save".
4. Attach your SSH secret
From the menu, navigate to "Infrastructures".
Select your on-premises infrastructure in the list.
Click the "Action" button.
Click "Attach secret".
Select the secret created previously from the list.
Click "Attach".
5. Declare a server
Navigate to the "Servers" menu.
Click "declare".
Give it a name.
Select the on premises infrastructure to deploy your servers to.
Select an operating system family from the list.
Enter the Ansible user (this is the user created in step 1, ex: "yak").
Configure Network:
Mode: select "manual".
IP address: enter the IP address of your server.
Scope: select private or public.
Check the "Admin access" checkbox.
Click Save.
Your server is now in "registered" state. The YaK is now able to communicate with it and deploy components.
6. Connect to your server
Connect to your newly declared server.
7. Declare and deploy your components
Please note that the YaK cannot manage on-premise servers. Hence the start/stop or destroy features have no effect when it comes to on-premises servers. Actions such as start, stop, destroy, etc... must be executed from your hypervisor (VmWare vSphere, Nutanix AHV, ProxMox..) or from your bare-metal machines.
Last updated