This guide is for anyone who has a hosted 3Bot and would like to migrate that identity to a local 3Bot. You might want to do this if you’ve created a farm using a hosted 3Bot, or if you’ve deployed workloads that you want to want to manage locally.
3Bot identities can be confusing. You have one associated with your ThreeFold Connect app, and another that was created when you launched the hosted 3Bot. To be able to use the hosted identity in the local environment, we’ll need to add the hosted identity to the local 3Bot, then add the Connect app identity as an admin on the hosted identity. To do this we’ll use a little bit of Python, but don’t worry if you’re not a coder, it’s just a couple simple commands.
To begin, install the local 3Bot, if you haven’t already. During setup, you’ll be prompted to enter your identity information. Choose
mainnet, and use the identity details under Settings in your Connect app in this step (note that the trailing
.3bot has been removed from the name):
Proceed to login to the local 3Bot and then go to the settings page. Pull up the settings page on your hosted 3Bot as well.
On the local 3Bot, hit New, and on the hosted 3Bot, select the identity (in this case
main). Copy each piece of info (you can choose any display name you want) into the form and then press Add.
Next we’re going to set the hosted identity as the default identity in our local 3Bot. This will give us access to any farms and solutions on the hosted identity. Before you do this, please review the steps below and make sure it all makes sense to you. Changing the default will lock you out of the 3Bot until the rest of the process is complete. The only way to recover is from the command line.
Click the new identity and then set it as default. You’ll see a message indicating that authentication has failed. Now, return to the terminal window where you lanched the 3Bot and kill the process. Alternatively, start a new terminal window and follow the same steps to launch the 3Bot up to
In the terminal, type
jsng to launch the command line SDK. This will be an interactive Python session that provides access to some Jumpscale facilities. You can reference the identity documentation regarding the following steps.
Check the current
me identity (on Mac, you may need a space after the command):
The output should match your hosted 3Bot identity. Add your Connect app id name as an admin (with the trailing
.3bot this time):
j.core.identity.me.admins.append("NEW_ADMIN_3Bot_NAME") # example: scott.3bot j.core.identity.me.save()
Now, restart the 3Bot web gui and login. You’ll be able to switch back and forth between your hosted identity and your app identity, by setting either as default.
How’d it go? Please leave me a reply if this worked for you or if anything is unclear