Local Development¶
Creating a local setup to test the assets.
You will need :
- A Robot Hackathon Cluster at demo.redhat.com (Data Center)
- One Robot
Prepare the robot¶
Connect Robot to your Network¶
- Connect to wired network & findout ip address
- Connect via SSH (wire) to robot
- The robot private keyfile needs to be named ~/.ssh/robot-hackathon
- You will want to connect the robot via Wifi now
- If you have Slate Router, you can connect it the same way this is done for actual workshops
- Alternatively you can connect the robot directly to another wifi router
- Note down the IP address
Update inventory¶
The default workshop automation/inventory.yaml looks like this:
From
For your local setup, copy the file to automation/local_inventory.yaml and modify with the name and IP of your robot.
e.g.:
Reset MicroShift at the Robot (Only required once)¶
At the cloud-native-robotz-hackathon/infrastructure repo:
Bring Data Center & Robot together¶
At the cloud-native-robotz-hackathon/infrastructure repo:
Create connection between data-center and local env¶
Testing the Robot Calls¶
You can test the calls bei adding the hostname or ip of the robot as user_key.
Now test the API Connection from the DC Cluster, for example from the WebTerminal (make sure to replace data your user_key) :
Custom user_key Mapping¶
If you want to map another other user_key to the robot you can set up a mapping:
In your Data Center open the ConfigMap robot-mapping-configmap in namespace hub-controller and edit the Roboname (user_key) mapping (e.g. data) to your Robot hostname (e.g. data.lan)
Restart the Hubcontroller Pod.