Simple Powershell Script that automatically tries to create a arm vps in oracle cloud using OCI. Resulting in a work-around for "out of capacity"
Resolving Oracle Cloud "Out of Capacity" issue and getting free VPS with 4 ARM cores / 24GB of memory
follow instructions to install oracle cloud cli
Install: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#InstallingCLI__windows
First, build the docker image and run it using --platform linux/amd64 due to oci-cli being amd64 only.
docker build --platform linux/amd64 -t oci:ps .in powershell prompt login to oracle cloud using this cli command:
oci session authenticatethen open/edit script, add tenancy id. follow instructions in script.
run script to easily get other parameters. read script for instructions.
disable setup mode.
then run script.
enjoy!
to install powershell and run script on linux:
apt install powershell
chmod +x create_oracle_arm_instance.ps1
./create_oracle_arm_instance.ps1
docker run -it -p 8181:8181 -v $(pwd):/root -w /root --platform linux/amd64 oci:ps pwsh create_oracle_arm_instance.ps1oci sessions expire every 24 hours, you must re-run:
oci session authenticatefrom docker:
docker run -it -p 8181:8181 -v $(pwd):/root -w /root --platform linux/amd64 oci:ps oci session authenticatethen visit the URL provided in the output to log in, and it will redirect to http://localhost:8181.