How to install Terraform on Ubuntu Server

If you’re looking to add automation into your Kubernetes pipeline, you might need Terraform. Find out how to install this must have for CI/CD.

istock-918951042.jpg

Image: iStockphoto/monsitj

With Kubernetes, there’s very little you cannot do. From deploying, scaling, managing, and developing, you are in control of how things happen, when they happen, and why they happen. Kubernetes has another trick up it’s enterprise-ready sleeve: Automation. With automation you can ensure your Continuous Integration/Continuous Delivery (CI/CD) pipelines run seamlessly and timely.

But how do you add automation into the Kubernetes chain of command? With Terraform. This open source infrastructure as code tool was created by HashiCorp and enables users to define and provision data center infrastructure using either HashiCorp’s own high-level configuration language or JSON.

But before you can integrate Terraform into your CI/CD pipeline, you have to first install it. Let me show you how.

SEE: DevOps: A cheat sheet (TechRepublic)

What you’ll need

The first thing you’ll need to install Terraform is a running Kubernetes cluster. If you don’t already have that cluster up and running, walk through my tutorial: How to deploy a Kubernetes cluster on Ubuntu server.

You’ll also need a user with sudo privileges. 

How to install Terraform

The first thing to be done is the installation of Terraform. To do this, we must locate the latest version of the software available from the Terraform web site. As of this writing, that is 0.12.24. 

Download the latest version with the command:

wget https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip

If you find the latest version to be newer than 0.12.24, make sure to substitute the new release number in the wget command.

Install zip with the command:

sudo apt-get install zip -y

Next, unzip the Terraform download with the command:

unzip terraform*.zip

Finally, move the executable with the command:

sudo mv terraform /usr/local/bin

Test to make sure the installation works with the command:

terraform version

You should see Terraform v0.12.24 printed out in the terminal window.

How to initialize Terraform

Now that terraform is installed, it must be initialized. However, to do that we must configure a provider, otherwise it won’t know where to pull from. We’re going to simply use Kubernetes as the provider for this instance. 

First, create a new directory to work in with the command:

mkdir ~/terraform

Change into that new directory with the command:

cd ~/terraform

Create a new configuration file with the command:

nano config.tf

In that file, paste the following:

# main.tf
provider "kubernetes" {}

Save and close the file. 

Now that we’ve defined our provider, we can initialize Terraform with the command:

terraform init

At this point, Terraform will download the plugin for the Kubernetes provider and you’re ready to go. 

If you’re looking for some AWS provider examples, some great samples can be be had with the command:

git clone https://github.com/terraform-providers/terraform-provider-aws.git

Change into the newly cloned directory with the command:

cd terraform-provider-aws/examples

You can now comb through much more complicated provider configurations for AWS. Change into one of the example directories (such as the two-tier directory) and then initialize that provider with the command:

terraform init

Once Terraform has initialized, you’ll want to go through the configurations for that example, in order to successfully run the the command:

terraform apply

For example, for the AWS providers, you’ll need to supply legitimate authentication keys for an AWS account–otherwise the apply command will fail.

I highly recommend you take the time to examine all the sample terraform provider configurations within the terraform-provider-aws directory, as there’s a lot to take in. 

Although Terraform isn’t the easiest tool you’ll ever use, the time it takes to understand its usage will be well spent. If you’re looking to integrate automation into your pipelines, this might well be exactly what you’re looking for.

Also see

Source

Google’s Covid-19 tracker will be delivered to your Android phone via Google Play

There have been some unexpected side-effects to the coronavirus pandemic, including the teaming up of Google and Apple to provide information to the public about the spread of the disease.

But while we’ve known for a few days about the two companies working together to keep mobile users informed about infected people nearby, there was something of a question about just how updates were going to be pushed out to users.

Now the company has shed some light on how the process will work, saying that it will used the established Google Play Services infrastructure to ensure that as many people as possible get the updates.

The benefit of using Google Play Services to update Android users with the latest information about Covid-19 tracing is that it means updates can be pushed to all handsets running Android 6.0 Marshmallow and above.

As well as maximizing the number of people that can be reached with individual updates, opting to using the Google Play Services infrastructure means that updates can also be spread much more quickly.

There had been fears, for instance, that operating system updates – of the style used to issued monthly security updates to Android – would not only mean people with older handsets would miss out, but also that the rollout of important informative updates would be much slower due to the involvement of handset makers.

Keep informed, keep safe

As reported by the The Verge, there will be two phases to the opt-in Bluetooth contact tracing framework which will enabled people to anonymously broadcast the fact they have tested positive for coronavirus. Both phases will be reliant on Google Play Services for updates, starting with the initial API rollout next month. Following on from this, “in coming months” we can expect to see APIs that are built into Android directly.

There will be a different system in place for Huawei phones that are not able to use key Google services. For these handsets, Google intends to produce a special framework for devices from Huawei, Xiaomi and other Chinese manufacturers, which they will have the option of using.

Via The Verge

Source

Tata Sky Broadband Introduces 1500GB FUP Cap on Unlimited Plans: Here’s What We Know

Tata Sky Broadband plans come in two varieties – Fixed GB plans and Unlimited plans. The Fixed GB plans, as the name suggests, offer a cap on data that varies with the package you subscribe. Until today, the unlimited broadband plans came with no cap on data or speed. However, the company seems to have changed its fine print, and has now started to throttle speed after the cap of 1500GB of data. This fine print can be spotted on the company website, and Tata Sky Broadband will take the Internet speed down to 2Mbps post the 1500GB cap.

The operator has changed the terms and conditions on its site for Unlimited plans. The company website has now added a new condition for Unlimited plans that reads, “For Unlimited Data plans, speed will reduce to 2Mbps after 1500GB data consumption.” This condition wasn’t mentioned before for unlimited plans.

Tata Sky Broadband Unlimited plans are offered with monthly, quarterly, half-yearly, and annual validity. The price of these plans start from Rs. 900. The Internet speeds offered via these plans range from 25Mbps to 100Mbps. Currently, Tata Sky Broadband is offering 15 percent discount on its annual plans, and 10 percent discount on its half-yearly plans.

The change in fair usage policy (FUP) was spotted by OnlyTech first.

A recent report suggests that Tata Sky Broadband is planning to offer its subscribers landline service with unlimited voice calling soon. This will be offered to Unlimited Plan subscribers only.

Source

Reddit will now publicly track political ad spending on its platform

Reddit is launching a new subreddit that will list all political ad campaigns that have run on the site since January 1st, 2019, the company announced today. The new subreddit can be found at r/RedditPoliticalAds.

“In this community, you will find information on the individual advertiser, their targeting, impressions, and spend on a per-campaign basis,” Reddit said in its announcement post. “We plan to consistently update this subreddit as new political ads run on Reddit, so we can provide transparency into our political advertisers and the conversation their ad(s) inspires.”

Reddit is also updating its policies for political advertising to require political campaigns to work with Reddit’s sales team on ads and to require political advertisers to leave comments on for the first 24 hours an ad campaign is live. However, advertisers can moderate the comments on the ad posts, according to a Reddit admin, so an advertiser could remove comments they don’t want shown under the ad, in theory.

r/RedditPoliticalAds will only feature ads that actually run on Reddit, the admin said. If ads are mistakenly approved and then removed, information about those ads will remain on the subreddit, but they’ll have a flair attached to their title that says the ad was “Approved in Error.”

Reddit joins Facebook in having a political ad database. Twitter, however, has bowed out entirely from having political ads on the site, announcing in October that it would ban all political ads globally starting in November. “We have made this decision based on our belief that political message reach should be earned, not bought,” Twitter says on its political content policy page.

Source

Moto Edge Plus may start Motorola’s comeback story on April 22

Motorola will finally reveal a new flagship phone at an event on April 22, according to an official tweet – and there’s a big chance it’ll be the Motorola Edge Plus we’ve heard about for months.

Details about the phone have leaked since February, when it was allegedly slated to be unveiled at MWC 2020 before that show was cancelled due to coronavirus. But rumors pointed to a revised launch date in April, and it seems Motorola is gearing up to unveil its new flagship phone. 

We’re not too surprised that Motorola waited this long, as other phonemakers have delayed their own announcements and reveals – we suspect the LG V60 was also slated to be revealed at MWC 2020 – and the Motorola Z4 had launched in May 2019.

And while we’ve heard a lot about the Motorola Edge Plus, the April 22 launch event could include the Motorola Edge, a version that may be smaller and lower-spec, much like the standard versions in other flagships.

  • Motorola Edge Plus: all we know about the potential flagship
  • Best phones: if the rumors are true, the Motorola Edge Plus could rank here
  • Moto Z4: compare the new phone with the brand’s last big handset

A new flagship…but not the Z-series?

Judging by all the leaks and rumors, the Motorola Edge Plus will be very unlike the Moto Z-series phones that came before. Instead of a smaller, more affordable handset with lower specs, the Edge Plus seems to be going full flagship. 

Sadly, it’s not compatible with Moto Mods, but it looks advanced in every other aspect: the display is somewhere between 6.5 inches and 6.8 inches with a 90Hz refresh rate, the triple rear camera includes a 108MP main shooter, and be 5G capable. It’ll also have a 3.5mm jack, if leaked renders are true.

In any case, the rumored Edge Plus suggests Motorola is getting into the flagship game with a strong contender to rival the Samsung Galaxy S20 and potential OnePlus 8 phones.

Source