• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Search

Archives for October 2021

Install AdoptOpenJDK

October 28, 2021

OpenJDK is an open-source implementation of the Java.

How to install AdoptOpenJDK.

TAR

cd /usr/java
wget --no-check-certificate https://bit.ly/3jKm3KZ
tar xzf OpenJDK8U-jdk_x64_linux_hotspot_8u312b07.tar.gz
export PATH=$PWD/jdk8u312-b07/bin:$PATH
java -version

cd /usr/java wget --no-check-certificate https://bit.ly/3jKm3KZ tar xzf OpenJDK8U-jdk_x64_linux_hotspot_8u312b07.tar.gz export PATH=$PWD/jdk8u312-b07/bin:$PATH java -version

RPM

cat <<'EOF' > /etc/yum.repos.d/adoptopenjdk.repo
[AdoptOpenJDK]
name=AdoptOpenJDK
baseurl=http://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/centos/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public
EOF

cat <<'EOF' > /etc/yum.repos.d/adoptopenjdk.repo [AdoptOpenJDK] name=AdoptOpenJDK baseurl=http://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/centos/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public EOF

yum install adoptopenjdk-8-openj9

yum install adoptopenjdk-8-openj9

Filed Under: Linux Tagged With: adoptopenjdk, install, java

Terraform User Data

October 26, 2021

Here’s how to add userdata in Terraform.

user_data = filebase64("${path.module}/example.sh")

user_data = filebase64("${path.module}/example.sh")

Filed Under: Cloud Tagged With: bootstrap, ec2, script, terraform, userdata

AWS CloudWatch Alarms

October 25, 2021

How to enable and disable CloudWatch alarms

$ aws cloudwatch disable-alarm-actions --alarm-names myalarm --region us-east-1
$ aws cloudwatch enable-alarm-actions --alarm-names myalarm --region us-east-1

$ aws cloudwatch disable-alarm-actions --alarm-names myalarm --region us-east-1 $ aws cloudwatch enable-alarm-actions --alarm-names myalarm --region us-east-1

Filed Under: Cloud Tagged With: alarm, aws, cloudwatch, disable, enable

Run Telnet on Git Bash

October 20, 2021

Although telnet is not used regularly since insecure, it’s a handy tool for testing ports.

For example, to check if a port 80 is open, you run this command.

$ telnet servername 80

$ telnet servername 80

Git Bash does not come with telnet, but you can use the Windows version by using winpty.

$ winpty telnet servername 457
Connecting To servername...Could not open connection to the host, on port 457: Connect failed

$ winpty telnet servername 457 Connecting To servername...Could not open connection to the host, on port 457: Connect failed

If port is open, you get an empty reply, just like in Windows.

Filed Under: Linux Tagged With: check, git bash, ports, telnet, windows

AWS Suspend Auto Scaling Group

October 20, 2021

You can administratively suspend a process in AWS Auto Scaling group for troubleshooting purposes.

Here are the available processes.

Terminate
Launch
AddToLoadBalancer
AlarmNotification
AZRebalance
HealthCheck
ReplaceUnhealthy
ScheduledActions

Terminate Launch AddToLoadBalancer AlarmNotification AZRebalance HealthCheck ReplaceUnhealthy ScheduledActions

If you have difficulty launching a VM, check if any of these processes are suspended.

Removed them if applicable.

Filed Under: Cloud Tagged With: auto scaling, aws, maintenance, processes, suspend

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to Next Page »
  • Home
  • About
  • Search

Copyright © 2023