This document shows the process of installing Stockmind through the wizard.
Stockmind installer manual¶
The prerequisites that must be left before launching the installer are the following:
- Have a domain or subdomain available to expose the API.
- Have the access codes for the amazon-cli client to access by API KEY. There is a security limitation that implies not being able to create more than 3 instances if the key was created less than 24/48 hours ago.
- In case of specifying authentication method with Twitter, have a Twitter account configured, that it can be managed externally using API KEY.
- In Amazon environment, you must have at least three free elastic ip for the deployment of the environment, it is necessary to remember that AWS provides 5 free eip, and above that limit begins to charge a price for each one.
Setting the initial environment
- The EC2 service is selected
- Create a first instance selecting "Create instance"
- Inside the instances, select t2.micro with Ubuntu Server 16.04 LTS
- To be able to access the machine from outside, you must configure a pair of keys. In addition, it's important to remember that key pairs should't exist in the "Commander" machine, since the installer create that keys.
- Amazon management panel shows a menu to select the key pairs that will be used, furthermore it allows to create a new key pair.
- In case of selecting a new key pair, Amazon requires a name to this pair of keys for its subsequent management
- Finally, with the "Review and Launch" button, the amazon instance is launched. This instance will be the Installer machine.
- Now, EC2 panel shows Intaller machine, and here we can obtain the public IP.
With the file that was created during the instantiation (if we create the key pair,
it will have a name in the name of the key_name.pem) and that we store somewhere in
the host with which we are working. Ideally, it should be stored in the path ~ /
.ssh to facilitate later configurations. With that file, the ip and the following
command, the amazon machine is accessed:
ssh -i fileroute / namekeypair.pem ubuntu @ machineip";
- The file can be sent by ssh to the installer machine with the command scp.
- When the ssh connection is started, connection confirmation is requested.
- Enter inside Installer machine.
- Decompress the tar file that was sent by ssh.
- After extracting the files, the result within the stockmind-installer folder is as follows:
- Finally, execute the installer with ./install.sh
- First, terraform is executed, we need the "Access Key" that we got in AWS.
- Select the zone in which the new instances that terraform deploys will be created.
- In the last screen of this step, the access configuration is shown.
- It is important to copy the resulting keys and keep them in a safe place. Then you can't recover them.
- In the next step, the deployment of the environment with Terraform begins. If the process fails, we should stop the execution of the installer with 'Control + C' and execute the script of ./unninstall. Then launch the installer again.
- The installer will consult the Commander IP, API and ELK with Terraform.
- In this step it is necessary to include the domain that will be used to access the API (prerequisite). It's important to be sure that the IP of the stockmind-API machine is targeted by the domain. If the DNS were not updated, it could give an error in the installation.
- Select the blockchain where Stockmind will work.
- Next, the following screens must be established with the domain, the client's ID, and the "Client Secret".
- In this step, we will configure an admin email.
- Finally, Ansible is executed in the different machines.
- In case of choosing Ethereum, a password is requested for the account that will be created in the parity node
- In this last step, the application is finished installing. At the end it returns the URL where the API can be consulted. Previously we will need to introduce a license for this installation.
You can use the dig command to verify that the ip is up to date. In case of Windows, the command is nslookup + domain
In case of choosing Ethereum, it will deploy a submenu with the possible networks is displayed:
In case of choosing Twitter, you must especify Twitter API Key and Twitter Secret.
We will need ether because the gas has an associated cost.