Oracle Cloud Infrastructure (OCI) has a new ARM based Ampere A1 instance type. Ampere Altra processors are the industry’s first 80-core Arm server at only $0.01 per core hour, with flexible sizing from 1–80 OCPUs and 1–64 GB of memory per core. The OCI Ampere Altra A1 compute platform provides deterministic performance, linear scalability, and a secure architecture with the best price-performance in the market. The new instances are available in all commercial OCI regions.

Credit : Unsplash

You can get started here with deploying the new ARM Instance using the Oracle Linux 8 Cloud Developer Image. Once the image is deployed, SSH into the instance and install Podman which is the OSS equivalent of Docker.

Install Podman on OCI A1 Ampere ARM Instance

$ ssh -i key.priv opc@110.x.x.x$ sudo -s $ yum install podman$ podman login docker.io
Username: 9*******8
Password:
Login Succeeded!

A. Deploy PostgreSQL Container using Podman *[1]

$ podman run --name postgres-arm64 -e POSTGRES_PASSWORD=PAssw0rd1234#_ -d docker.io/arm64v8/postgres$ podman container listCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d******7 docker.io/arm64v8/postgres:latest postgres 3 minutes ago Up 3 minutes ago postgres-arm64

A-1. Create PostgreSQL Table and Insert Records

$ podman exec -it postgres-arm64 psql -U postgres -c “CREATE TABLE users(id SERIAL PRIMARY KEY, col1 VARCHAR(200));”$ podman exec -it postgres-arm64 psql -U postgres -c “INSERT INTO public.users(col1) VALUES(‘record1’);”$ podman exec -it postgres-arm64 psql -U postgres -c “INSERT INTO public.users(col1) VALUES(‘record2’);”$ podman exec -it postgres-arm64 psql -U postgres -c “SELECT * FROM public.users;”id |  col1
----+---------

1 | record1
2 | record2
(2 rows)

B. Deploy Redis Container using Podman *[2]

$ podman run --name redis-arm64 -d docker.io/arm64v8/redis redis-server --save 60 1 --loglevel warning$ podman container listCONTAINER ID  IMAGE                              COMMAND               CREATED         STATUS             PORTS       NAMES
d*****7 docker.io/arm64v8/postgres:latest postgres 20 minutes ago Up 20 minutes ago postgres-arm64
a*****1 docker.io/arm64v8/redis:latest redis-server --sa... 11 seconds ago Up 11 seconds ago redis-arm64$ podman image listREPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/arm64v8/redis latest 5****d 44 hours ago 115 MB
docker.io/arm64v8/postgres latest 4****c 8 days ago 363 MB

B-1. Check via redis-cli

$ podman exec -it redis-arm64 redis-cli127.0.0.1:6379> ZADD mycolorset 1 white
(integer) 1
127.0.0.1:6379> ZADD mycolorset 2 black
(integer) 1
127.0.0.1:6379> ZRANGE mycolorset 0 -1
1) "white"
2) "black"

Whats Next :

OCI Free Tier

Get started *[3] on OCI services now. The Always Free tier includes the services you can use for an unlimited time and the following features:

  • Two Oracle Autonomous Databases with powerful tools like Oracle Application Express (APEX) and Oracle SQL Developer
  • Two AMD Compute virtual machines
  • Up to four instances of Arm Ampere A1 Compute
  • Block, Object, and Archive Storage, load balancer, data egress, Monitoring, and Notifications

You can also discuss this and other topics on our DevRel public Slack channel!

References :

[1] https://hub.docker.com/r/arm64v8/postgres/

[2] https://hub.docker.com/r/arm64v8/redis/

[3] https://www.oracle.com/au/cloud/free/

Logo

PostgreSQL社区为您提供最前沿的新闻资讯和知识内容

更多推荐