DataSunrise Achieves AWS DevOps Competency Status in AWS DevSecOps and Monitoring, Logging, Performance

Efficient DataSunrise Configuration on AWS with OpenTOFU

Efficient DataSunrise Configuration on AWS with OpenTOFU

opentofu aws

Every day companies all over the world tend to lean more and more towards cloud deployment of the software they use. It’s a given, because such a method is cost-efficient and may be easier to manage. But still, the deployment process is not simple. For cloud deployment simplification purposes software like Terraform and its fork OpenTOFU have emerged. In this article we’ll cover integration of DataSunrise with OpenTOFU on Amazon Web Services.

What is OpenTOFU?

OpenTOFU is a fork of Terraform, a program for provisioning and managing infrastructure resources across various cloud providers. In context of OpenTOFU, the term “provider” refers to cloud computing platforms, such as Microsoft Azure or Google Cloud. Terraform simplifies the process of deploying resources, such as virtual machines or databases, down to a couple of command prompts.

OpenTOFU was forked from Terraform in 2021 when Terraform’s developer HashiCorp switched from an open source license to a business source license. It maintains open source policy and is still highly compatible with terraform scripts.

OpenTOFU with AWS

The github repository of OpenTOFU contains a registry of all the supported cloud providers, including Amazon Web Services. This list is used by OpenTOFU during the initialization of deployment. It detects the provider specified in the main.tf file and OS of the host machine, and based on that it downloads the required data for the deployment to start from the specific .json file on the registry repository. The AWS registry file would look like this:

{
"versions": [
{
"version": "5.52.0",
"protocols": [
"5.0"
],
"shasums_url": "https://github.com/opentofu/terraform-provider-aws/releases/download/v5.52.0/terraform-provider-aws_5.52.0_SHA256SUMS",
"shasums_signature_url": "https://github.com/opentofu/terraform-provider-aws/releases/download/v5.52.0/terraform-provider-aws_5.52.0_SHA256SUMS.sig",
"targets": [
{
"os": "darwin",
"arch": "amd64",
"filename": "terraform-provider-aws_5.52.0_darwin_amd64.zip",
"download_url": "https://github.com/opentofu/terraform-provider-aws/releases/download/v5.52.0/terraform-provider-aws_5.52.0_darwin_amd64.zip",
"shasum": "b67098f16684eea8ab3448950c3abe1bebe8d33f2041e228fb75cdac7c3f60af"
},
...

OpenTOFU sends the info about the OS and the required provider and downloads a .zip file accordingly. The rest of the processes go on with the assistance of the downloaded provider.

Deployment of DataSunrise

To ease the deployment experience of the clients, DataSunrise repository provides them with “template Terraform scripts” for each of the supported cloud platforms. For successful deployment, everything from the repository is required to be downloaded and put into tofu folder, but the most important files are “main.tf” and “variables.tf”. The “variables.tf” file is the one that specifies all the settings for deployment and the one user would need to configure. The file looks like this (truncated preview):

variable "deployment_name" {
description = "Name that will be used as the prefix to the resources' names that will be created by the Terraform script (only in lower case, not more than 15 symbols and not less than 5 symbols)"
default   = "xxxxxxxxx"
}
# ------------------------------------------------------------------------------
# Virtual Machine Configuration
# ------------------------------------------------------------------------------

variable "ds_launch_temlate_ec2_keyname" {
description = "Key pair to attach to every EC2 instance created"
default   = "xxxxxxxxx"
}
...

There are 24 variables similar to this in the file dedicated to DataSunrise settings alone, including a target database.

After correctly configuring the file, the changes must be applied to the OpenTOFU CLI.

The Steps for Configuring DataSunrise With OpenTOFU

Before running the obtained scripts, the user must make sure that:

  1. The user has an active DataSunrise License.
  2. The user has an active AWS account.
  3. AWS CLI is installed on the host machine.
  4. OpenTOFU CLI is present of the host machine.
  5. The scripts are located in the OpenTOFU folder and “variables.tf” file is configured correctly.

After that, user must set AWS credentialts to the environment variables in order to authorize OpenTOFU with the AWS account. This is where AWS CLI is needed. Credentials can be set up in the environment variables like this:

set AWS_ACCESS_KEY_ID=********************
set AWS_SECRET_ACCESS_KEY=****************************************
set AWS_DEFAULT_REGION=************

Now OpenTOFU must apply all changes. For that user must run in the tofu directory the following prompts:

tofu init - upgrade

This command downloads the zip archive based on your OS and the required provider with the necessary data for the API to work correctly. The “-upgrade” option looks for the latest verison of the provider. Next command to run:

tofu plan

This command maps out all the actions to be committed by tofu, specified in main.tf file and prints them into console for the user to confirm them.

tofu apply

This command starts the deployment process. OpenTOFU will require additional consent from the user to start it, because cloud services may be quite expensive. Therefore, user must double-check everything while configuring tofu.

Once the process of deployment finishes, tofu will print the required information to start using DataSunrise, such as IP addresses of virtual machines or URL which connects to DS.

If user faces any difficulties, they are encouraged to contact DataSunrise support team at any moment.

OpenTOFU management

For maintenance, the user has the ability to check on each of the resources in the resource group in the AWS account.

In case the need for the configuration is no more, removing it piece by piece manually might be bothersome. OpenTOFU simplifies it too with the command “tofu destroy”. The command completely removes the configuration run by a specific OpenTOFU instance.

Conclusion

The process of DataSunrise deployment using cloud services may be very difficult for an inexperienced user. OpenTOFU simplifies it to the maximum, therefore AWS is not such a big obstacle anymore.

Using the scripts provided by DataSunrise repository you can easily set up the OpenTOFU configuration and deploy the software on AWS in a matter of minutes. And maintenance is just as easy as deployment, because deletion is in one click.

Make sure to contact our team to schedule an online demo or obtain the necessary OpenTOFU scripts for your specific needs. With these scripts and the power of OpenTOFU, deploying DataSunrise on Amazon Web Services becomes a straightforward and efficient process.

Next

DSPM vs. CSPM

DSPM vs. CSPM

Learn More

Need Our Support Team Help?

Our experts will be glad to answer your questions.

Countryx
United States
United Kingdom
France
Germany
Australia
Afghanistan
Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Bouvet
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Congo, Republic of the
Congo, The Democratic Republic of the
Cook Islands
Costa Rica
Cote D'Ivoire
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard Island and Mcdonald Islands
Holy See (Vatican City State)
Honduras
Hong Kong
Hungary
Iceland
India
Indonesia
Iran, Islamic Republic Of
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Democratic People's Republic of
Korea, Republic of
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Libyan Arab Jamahiriya
Liechtenstein
Lithuania
Luxembourg
Macao
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States of
Moldova, Republic of
Monaco
Mongolia
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
North Macedonia, Republic of
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestinian Territory, Occupied
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Helena
Saint Kitts and Nevis
Saint Lucia
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Samoa
San Marino
Sao Tome and Principe
Saudi Arabia
Senegal
Serbia and Montenegro
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Georgia and the South Sandwich Islands
Spain
Sri Lanka
Sudan
Suriname
Svalbard and Jan Mayen
Swaziland
Sweden
Switzerland
Syrian Arab Republic
Taiwan, Province of China
Tajikistan
Tanzania, United Republic of
Thailand
Timor-Leste
Togo
Tokelau
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Turks and Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Venezuela
Viet Nam
Virgin Islands, British
Virgin Islands, U.S.
Wallis and Futuna
Western Sahara
Yemen
Zambia
Zimbabwe
Choose a topicx
General Information
Sales
Customer Service and Technical Support
Partnership and Alliance Inquiries
General information:
info@datasunrise.com
Customer Service and Technical Support:
support.datasunrise.com
Partnership and Alliance Inquiries:
partner@datasunrise.com