Infracost Installation¶
Scalr natively supports Infacost to perform cost estimation by default. To retrieve the pricing data, the Infracost binary contacts a cloud-pricing server (ensure your server can connect to 34.149.169.167 over 443), which is maintained by the Scalr team. If Scalr is installed in a private network and it does not have the Internet access, you can follow the instructions to install the Infracost cloud pricing server alongside Scalr in the same network.
First, follow the Infracost guide on how to install the self-hosted cloud pricing server.
After the installation is done and an API access token has been created, update the
/etc/scalr-server/scalr-server.rb
file with following code, replace the placeholders with the respective cloud-pricing server hostname and API token, and then run thescalr-server-ctl reconfigure
command:
app[:configuration] = {
:scalr => {
"tf_worker" => {
:infracost => {
:api_url => '<infracost_api_url>',
:api_key => '<infracost_api_key>',
}
}
}
}
Once these steps are completed, the cost estimation feature will be available for your Scalr install.