Usage
Requirement of Zprem repo
Requirements
For Ansible Server (Controller Node) -
Minimum 4 CPU,8GB RAMand8GB StorageFor 0prem Server (Managed Node)
For testing purpose -
Minimum 16 CPU,32GB RAMand50GB StorageRecommended -
48 CPU,128GB RAMand150TB Storage
The Operating System of Ansible and 0prem Server should be
Ubuntu 18.04.6 LTSorUbuntu 20.04.4 LTS
SSH
Sudo
This documentation presumes that users will employ the sudo utility for elevating privileges from the login user to the root user; a configuration in the file /etc/sudoers such as this:
# Allow members of group sudo to execute any command
sudo ALL=(ALL:ALL) ALLShare SSH Keys
Login to the Ansible Server -
a) run the following command in ansible server
sudo su -after running the above commands your current directory should be /root you can check by using pwd command.
pwdBefore running ansible-playbook the ansible server should share ssh public key to 0prem server.
To create an SSH key:
Generate the key:
Append the public key (~/.ssh/id_rsa.pub by default) to the file ~/.ssh/authorized_keys of each remote server by using :
or
Check the ansible server can login into 0prem server without asking any password by the following command: ssh [email protected] or ssh user@IPv4
0prem
Clone the repository on ansible server
Change the directory
Your current directory should be
~/Zpremand add IPv4 in inventory fileNOTE: write same IP in kubespray, master and worker groupsEdit input.yaml
Install pip3
Install Ansible and other tools
Give aws credentials in
0ansible/aws-credentials.yamlfile -NOTE: This code itself creates DNS records in Route53<cluster>.<domain>rancher.<cluster>.<domain>grafana.<cluster>.<domain>
Example - DNS Looks like zcn.0chain.net , rancher.zcn.0chain.net , grafana.zcn.0chain.net and 0box.zcn.0chain.net
Add Remote User in
ansible.cfgfileNote: use remote user same as used in ssh-copy-id [email protected]
Run the Ansible Playbook
Your current directory should be ~/0ansible :
if you want to check broader logs then run :
Links
This link is created by binding host_address and domain in on_prem.json.
Syntax of URL - https://<cluster_name>.<domain>
Explorer -
zcn.0chain.net# link of the network you joined [will be shared once whole network is deployed]Rancher -
rancher.zcn.0chain.net# link of the rancher you launchedGrafana -
grafana.zcn.0chain.net# link of the grafana you launchedDiagnostics Page -
zcn.0chain.net/sharder01/_diagnostics
Update-Resources
After Launching blobbers to a network if you wish to change any value then use update-blobber-resources.yaml file. NOTE: your current path should be ~/0ansible/.
Run the following command for updating blobbers value -
Run the following command for updating miners & sharders value -
ResetNetwork
For reset of the network [not the cluster] run reset-0chain.yaml file. NOTE: your current path should be ~/0ansible/.
Run the following command for updating value -
RedeployNetwork
After running the reset playbook run after-reset.yaml playbook. NOTE: your current path should be ~/0ansible/.
Run the following command for setting up network again -
A prompt will open which asks for
Y/N[here Y is Yes and N is No]. So typeYif you wish to delete configmaps otherwise typeNand pressENTERkey.About this reset script there are certain points -
Rancher - after redeploy rancher will use password same as used in first deployment [ though there are few ways through which we can create new username & password ]
Grafana - grafana will not pick earlier password after redploying it [ always pick the password given in input file so grafana password can be changed according to set by you ]
Remove-K8SCluster
For removing entire kubernetes cluster change your current directory to /root/kubespray and run the following command -
Last updated