Open User-124564 opened 3 weeks ago
yes, same here.
Same here
can you guys please activate the environment manually and run python3 main.py
and give me the logs ?
I tried to do everything second time with OCI_SUBNET_ID filled and after I tried to run python3 main.py, I needed to install oci, paramiko and python-dotenv, after that I run python3 main.py [see screenshot], so I checked oci.env (I changed image from Ubuntu back original to Canonical Ubuntu bc it said Ubuntu is not a command(like in screenshot) when I had Canonical Ubuntu, then I run ./setup_init.sh rerun
based on the screenshot is the script running correctly, or how will I know an instance was created?
can you guys please activate the environment manually and run
python3 main.py
and give me the logs ? When I connected to the instance through PowerShell, do my PC need to run or I can power off and the script will still be running?
Try creating the ARM instance from your oci console , if oracle is naming the os images differently in - different regions then it gets complex for running the script.
Try creating the ARM instance from your oci console , if oracle is naming the os images differently in - different regions then it gets complex for running the script.
hey @mohankumarpaluru, thanks for this script and following up.
Can you explain what you mean by:
Try creating the ARM instance from your oci console , if oracle is naming the os images differently in - different regions then it gets complex for running the script.
from
Pre-Requisites VM.Standard.E2.1.Micro Instance: The script is designed for a Ubuntu environment, and you need an existing subnet ID for ARM instance creation. Create an always-free VM.Standard.E2.1.Micro instance with Ubuntu 22.04. This instance can be deleted after the ARM instance creation. (Not required if an existing OCI_SUBNET_ID is defined in oci.env file)
I understood I needed to do it from a VM.Standard.E2.1.Micro instance with Ubuntu 22.04
Can you clarify please?
Also please let me know if you see any errors in my oci.env
file
Thanks a lot
hey @mohankumarpaluru, thanks for this script and following up.
Can you explain what you mean by:
Try creating the ARM instance from your oci console , if oracle is naming the os images differently in - different regions then it gets complex for running the script.
from
Pre-Requisites VM.Standard.E2.1.Micro Instance: The script is designed for a Ubuntu environment, and you need an existing subnet ID for ARM instance creation. Create an always-free VM.Standard.E2.1.Micro instance with Ubuntu 22.04. This instance can be deleted after the ARM instance creation. (Not required if an existing OCI_SUBNET_ID is defined in oci.env file)
I understood I needed to do it from a VM.Standard.E2.1.Micro instance with Ubuntu 22.04 Can you clarify please? Also please let me know if you see any errors in my
oci.env
file Thanks a lot
I think the OCI_IMAGE_ID that u have here is not correct, it should look like this: ocid1.image.oc1.eu-frankfurt-1.aaa.....6eq its the OCID of image
hey @bitsByB ,
I think there is some confusion, the Image ID or image os and other details defined in the oci env are for your new ARM instance you are trying to create and not the existing micro instance.
the Image ID or image os and other details defined in the oci env are for your new ARM instance you are trying to create
@mohankumarpaluru , yes that is clear to me but I'm not sure what I am doing wrong...
Correct me if I misunderstand:
After that I should:
Can you tell me what I am missing or doing wrong (my oci.env
file?), I really want this thing to succeed :)
Also what do you think about the option to upgrade to PAYG to increase the odd of succeeding?
thanks a lot @mohankumarpaluru for your help
Hey @bitsByB please remove the image ID and run the script manually. Share any errors you encounter here. If you need a different image, check for images_list.json
in your project directory to get the image ID for your OCI. If you're okay with Ubuntu 22, just remove the ID and run it manually.
Also, Pay to Go should let you create the instance directly from the OCI console even without the help of the script. Just be cautious that setting proper limits is very important, and Oracle being Oracle, the support for payment issues is very poor.
@mohankumarpaluru thanks for sticking with me :)
so I removed the oci_image_id
I'm still getting several errors:
what is the cause of those 2 ones:
/opt/rh/devtoolset-10/root/usr/bin/sudo: line 41: /usr/bin/sudo: No such file or directory
/opt/rh/devtoolset-10/root/usr/bin/sudo: line 41: /usr/bin/sudo: No such file or directory
should I remove or modify those lines in oci.env
to solve oci.env: line 14: Ubuntu: command not found
?
for oci.env: line 20: xetx: command not found
what is the correct way of writing the app password?
EMAIL_PASSWORD= wwww xxxx yyyy zzzz
or
EMAIL_PASSWORD= wwwwxxxxyyyyzzzz
When you say run the script manually your talking about ./setup_init.sh
not main.py
right?
Thanks a lot (also for the PAYG concern)
OPERATING_SYSTEM=Canonical Ubuntu
OS_VERSION=22.04
# Gmail Notification
NOTIFY_EMAIL=False
EMAIL=abc@gmail
EMAIL_PASSWORD=16characterswithoutspaces
The operating system is set to Canonical Ubuntu
with version 22.04
.
Regarding the email configuration, the sample password clearly states 16characterswithoutspaces
🤷🏻
Also could you clarify whether you are accessing this from your Micro Instance via SSH or directly from the OCI Cloud Shell and not micro instance ?
when I say run manually, I mean to activate the python virtual environment manually and then run python3 main.py
Yes, sorry about the 16characterswithoutspaces
, I think I didn't see it because I used setup_env.sh
in the first place I guess.
So after correcting this I'm still getting:
/opt/rh/devtoolset-10/root/usr/bin/sudo: line 41: /usr/bin/sudo: No such file or directory
/opt/rh/devtoolset-10/root/usr/bin/sudo: line 41: /usr/bin/sudo: No such file or directory
and
oci.env: line 14: Ubuntu: command not found
Also could you clarify whether you are accessing this from your Micro Instance via SSH or directly from the OCI Cloud Shell and not micro instance ?
I'm accessing this from the OCI Cloud Shell. (Should I accees via SSH?)
when I say run manually, I mean to activate the python virtual environment manually and then run
python3 main.py
to activate it I do python -m venv venv
in my oracle-freetier-instance-creation
directory right?
and then do python3 main.py
Thanks
to find the imageID, pretend you create an instance with your choice of Image and OS
from another Github script Readme page:
…open browser's dev tools -> network tab. Click "Create" and wait a bit most probably you'll get "Out of capacity" error. Now find /instances API call (red one)…
Dev Tools
…and right click on it -> copy as curl. Paste the clipboard contents in any text editor and review the data-binary parameter. Find
subnetId
,imageId
and set OCI_SUBNET_ID, OCI_IMAGE_ID, respectively.
That being said, I get something like this each time:
below is extracted from the line --data-raw '{"metadata":{"ssh_authorized_keys":"ssh-rsa....
"imageId":"ocid1.image.oc1.eu-amsterdam-1.rrrrrrrrrruu5thgsrr53naupyaz3777egx643eaoshpel6ha32qviqcp7yx64a"
"subnetId":"ocid1.subnet.oc1.eu-amsterdam-1.rrrrrrrrrruuooggtqmsxkiz5snzp6r3jisih75isfonb4njtkc6feet4pt4qrq"
I manually changed these characters in this post, because I don't know if they have any relation to my account.
Every time you try to create a new instance, the characters after ocid1.image.oc1.eu-amsterdam-1
change.
Are we supposed to keep the entire string for OCI_IMAGE_ID=
or just use ocid1.image.oc1.eu-amsterdam-1
?
By the way, I also get the error code like everyone else, but the script seems to be running:
ubuntu@ubuntu:~/oracle-freetier-instance-creation$ ./setup_init.sh rerun
Previous Log files deleted.
oci.env: line 14: Ubuntu: command not found
Script is running successfully
I get also the same error code like yours
ubuntu@ubuntu:~/oracle-freetier-instance-creation$ ./setup_init.sh rerun
Previous Log files deleted.
oci.env: line 14: Ubuntu: command not found
Script is running successfully
with
tail -f launch_instance.log
it updates based on the time u set, so I think its running, even in ps aux | grep -E "setup_init.sh|python"
it is running,
now its been almost three days and still "Out of capacity"
As for oci.env: line 14: Ubuntu: command not found
error, I suppose that OPERATING_SYSTEM
variable should be formatted in quotes as "Canonical Ubuntu"
. Then the error doesn't show up.
By the way, @smailpouri @bitsByB @User-124564 Were you able to get the instance in last two weeks?
hey @LordSithek, thanks for checking in and the answer to that error. Unfortunately no, I'm still struggling to have the script running. I asked more explanation in the comment section (if you know the answer, it would be much appreciated) What about you? did you manage to have the script running and did you get an instance finally?
hey @LordSithek, thanks for checking in and the answer to that error. Unfortunately no, I'm still struggling to have the script running. I asked more explanation in the comment section (if you know the answer, it would be much appreciated) What about you? did you manage to have the script running and did you get an instance finally?
I was able to create and run the script successfuly, although from what I read on Reddit about many users experience, currently it's very difficult to get Ampere instance even with the help of the script. Depending on your luck, it may take days, weeks or even months. So I consider switching to PAYG account.
I've seen your posts and I'm not sure about the No such file or directory
error, I would just set everything up from the scratch and try again. You can refer to my oci.env
file here: https://imgur.com/a/3VGdAIy (I covered sensitive data but you should be able to grasp the configuration)
Thanks a lot man @LordSithek , the screenshot is much appreciated! Yes I'm gonna restart from scratch and give it a last shot before switching to PAYG as well. Thanks again
@LordSithek I meant the Discussions
section (not the comment)
https://github.com/mohankumarpaluru/oracle-freetier-instance-creation/discussions/48
@LordSithek I meant the
Discussions
section (not the comment) #48
Oh I see, I'll try to answer you there
By the way, @smailpouri @bitsByB @User-124564 Were you able to get the instance in last two weeks?
No, I wasnt able to get one, I think it is almost three weeks
As for
oci.env: line 14: Ubuntu: command not found
error, I suppose thatOPERATING_SYSTEM
variable should be formatted in quotes as"Canonical Ubuntu"
. Then the error doesn't show up.By the way, @smailpouri @bitsByB @User-124564 Were you able to get the instance in last two weeks?
Nope, it's been running since my last message and still nothing, it tries every 60s. Someone from support suggested I should upgrade to a Pay As You Go plan
For context: due to overwhelming demand for Arm-based instances, most OCI regions are currently low on capacity for Ampere A1 resources for free tier accounts. That’s why you are seeing see out-of-capacity errors when attempting to launch Ampere A1 shapes.
I do, however, have an easy and free fix to recommend. Based on my work with other customers, upgrading to Pay-as-you-Go will resolve the out-of-capacity errors issue (as more capacity is allocated for paid accounts). Accounts upgraded to PAYG get access to the same Always Free Resources as trial accounts, so as long as your usage falls within the bounds of the Always Free Tier, then the A1 compute will be free even on a paid account. As a reminder, you can always monitor and manage your billing using our billing and cost management tools.
As for
oci.env: line 14: Ubuntu: command not found
error, I suppose thatOPERATING_SYSTEM
variable should be formatted in quotes as"Canonical Ubuntu"
. Then the error doesn't show up. By the way, @smailpouri @bitsByB @User-124564 Were you able to get the instance in last two weeks?Nope, it's been running since my last message and still nothing, it tries every 60s. Someone from support suggested I should upgrade to a Pay As You Go plan
For context: due to overwhelming demand for Arm-based instances, most OCI regions are currently low on capacity for Ampere A1 resources for free tier accounts. That’s why you are seeing see out-of-capacity errors when attempting to launch Ampere A1 shapes.
I do, however, have an easy and free fix to recommend. Based on my work with other customers, upgrading to Pay-as-you-Go will resolve the out-of-capacity errors issue (as more capacity is allocated for paid accounts). Accounts upgraded to PAYG get access to the same Always Free Resources as trial accounts, so as long as your usage falls within the bounds of the Always Free Tier, then the A1 compute will be free even on a paid account. As a reminder, you can always monitor and manage your billing using our billing and cost management tools.
Yeah, I suppose it's the only reasonable solution at the moment
Funny, just tried to upgrade to PAYG and I couldn't. When clicking final confirmation, I'm getting something like "server refused the connection". Disabled adblockers, tried on different networks. Maybe their server is down... Anyway, offtopic here ;)
EDIT: I figured it out. It didn't want to accept my card used for Free Tier until I added it once again on the upgrade page. Now the upgrade is pending.
Yes, it went through for me as well, pending took a few hours though. The connection is pretty fast! sweet Thanks @LordSithek
after first and second ./setup_init.sh still got message //Couldnt find any logs waiting 60 secs before checking again//
Instance Type
Environment