Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One Click installer #34

Open
wants to merge 8 commits into
base: feature/cloudformation_regions
Choose a base branch
from

Conversation

jmikedupont2
Copy link
Owner

@jmikedupont2 jmikedupont2 commented Feb 3, 2025

one-click installer

First, you'll need 3 things (like getting your ingredients ready before cooking):

  1. An AWS account - think of this as renting space in a big computer warehouse (it's free to start!)
    aws acount https://aws.amazon.com/free/
    AWS Account
    Sign-up Link: https://aws.amazon.com/free/
    Description: An AWS account is required to access AWS services such as CloudFormation, S3, EC2, and more. The free tier offers limited usage of various services, which can be sufficient for development, testing, or small-scale applications.
    Steps to Sign Up:
    Go to the AWS website and click on "Create an AWS account".
    Fill in your email address, password, and account name.
    Provide your contact information, including your name, address, and phone number.
    Verify your email address and phone number.
    Add a payment method (credit card or other accepted methods) to your account. Note that you won't be charged unless you exceed the free tier limits.

  2. A Groq account - this gives your robot its brain (you'll get a special key to use it)
    groq.com api key https://console.groq.com/login
    Groq API Key
    Sign-up Link: https://console.groq.com/login
    Description: A Groq API key is necessary for interacting with the Groq platform, which offers services related to natural language processing, machine learning, and more. The API key will be used to authenticate your requests to the Groq API.
    Steps to Obtain an API Key:
    Go to the Groq console and sign in or create an account if you don't have one.
    Navigate to the API keys or settings section.
    Generate a new API key or access an existing one.
    Save the API key securely, as you'll need it for your application.

  3. A Twitter account - this is where your robot will talk to people
    twitter account https://www.wikihow.com/Make-a-Twitter-Account

  4. Twitter Account
    Sign-up Link: https://www.wikihow.com/Make-a-Twitter-Account
    Description: A Twitter account is required for integrating your application with Twitter services, such as posting updates, responding to tweets, or analyzing Twitter data.
    Steps to Create a Twitter Account:
    Go to the Twitter website or download the Twitter app.
    Click on "Sign up" and enter your name, email address, and password.
    Choose a username (handle) for your Twitter account.
    Verify your email address or phone number.
    Set up your Twitter profile, including a profile picture and bio.

After completing these prerequisites, you should have:

An AWS account with access to various AWS services.
A Groq API key for interacting with the Groq platform.
A Twitter account for integrating with Twitter services.
These prerequisites are likely necessary for setting up a specific application or service that leverages the capabilities of AWS, Groq, and Twitter.
4. You will need to accept the aws ubuntu image terms for now, there might be a different link for different regions
that it will show you.

Now, there's a special link (the one-click installer). When you click it, it's like filling out a form with:

  • Your Twitter username without @
  • Your Twitter password (Dont use any of these spcial chars like ` " ' $ { } ) !
    this is a bug in my code i need to fix.
  • Your Twitter email [email protected]
  • Your Groq key (the brain power key) ******
  1. Visit the generated links and pick region to install
    https://github.com/jmikedupont2/ai-agent-terraform/blob/feature/cloudformation_regions-patch1/cloudformation/installer.md
  • ap-northeast-1 Launch ap-northeast-1 Stack
  • ap-northeast-2 Launch ap-northeast-2 Stack
  • ap-northeast-3 Launch ap-northeast-3 Stack
  • ap-south-1 Launch ap-south-1 Stack
  • ap-southeast-1 Launch ap-southeast-1 Stack
  • ap-southeast-2 Launch ap-southeast-2 Stack
  • ca-central-1 Launch ca-central-1 Stack
  • eu-central-1 Launch eu-central-1 Stack
  • eu-north-1 Launch eu-north-1 Stack
  • eu-west-1 Launch eu-west-1 Stack
  • eu-west-2 Launch eu-west-2 Stack
  • eu-west-3 Launch eu-west-3 Stack
  • sa-east-1 Launch sa-east-1 Stack
  • us-east-1 Launch us-east-1 Stack
  • us-east-2 Launch us-east-2 Stack
  • us-west-1 Launch us-west-1 Stack
  • us-west-2 Launch us-west-2 Stack

now use that to explain the parameters and how to fill them out, leave the other default for the region

  • param_GroqKey: This parameter requires your Groq API key.
    Value: YOUR_GROQ_API_KEY (replace with your actual Groq API key)
    Description: This key will be used to authenticate your requests to the Groq API.

  • param_TwitterUserName: This parameter requires your Twitter account username.
    Value: YOUR_TWITTER_USERNAME (replace with your actual Twitter username)
    Description: This username will be used to identify your Twitter account.

  • param_TwitterPassword: This parameter requires your Twitter account password.
    Value: YOUR_TWITTER_PASSWORD (replace with your actual Twitter password)
    Description: This password will be used to authenticate your Twitter account.

  • param_TwitterEmail: This parameter requires the email address associated with your Twitter account.
    Value: YOUR_TWITTER_EMAIL (replace with your actual Twitter email)
    Description: This email address will be used to verify your Twitter account.

@jmikedupont2 jmikedupont2 changed the title patch one One Click installer Feb 4, 2025
@jmikedupont2
Copy link
Owner Author

Resource handler returned message: "ARN specified for Service-Linked Role does not exist. (Service: AutoScaling, Status Code: 400, Request ID: d0b84dcf-67dc-41e7-bfa1-574bff885d41)" (RequestToken: 27578a1b-afc7-5202-bd09-16a62a521bbe, HandlerErrorCode: InvalidRequest)

@jmikedupont2
Copy link
Owner Author

@jmikedupont2
Copy link
Owner Author

Resource handler returned message: "ARN specified for Service-Linked Role does not exist. (Service: AutoScaling, Status Code: 400, Request ID: d0b84dcf-67dc-41e7-bfa1-574bff885d41)" (RequestToken: 27578a1b-afc7-5202-bd09-16a62a521bbe, HandlerErrorCode: InvalidRequest)

this appears to be the first time issue, try redeploying


You must have IAM permissions to create the service-linked role. Otherwise, the automatic creation fails. For mo```
https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html#create-service-linked-role

@jmikedupont2
Copy link
Owner Author

Resource handler returned message: "ARN specified for Service-Linked Role does not exist. (Service: AutoScaling, Status Code: 400, Request ID: d0b84dcf-67dc-41e7-bfa1-574bff885d41)" (RequestToken: 27578a1b-afc7-5202-bd09-16a62a521bbe, HandlerErrorCode: InvalidRequest)

this appears to be the first time issue, try redeploying


You must have IAM permissions to create the service-linked role. Otherwise, the automatic creation fails. For mo```
https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html#create-service-linked-role

Workaround is to create an ASG and LT manually, we will fix the code

@jmikedupont2
Copy link
Owner Author

There is a requirement to accept the license for ubuntu for now
you will prompted with something like this https://aws.amazon.com/marketplace/pp/prodview-4nt6tk24xfkai to accept
https://aws.amazon.com/marketplace/pp/prodview-s4zvkzmlirbga

@jmikedupont2
Copy link
Owner Author

for resetting pasword

export AGENT_NAME=tine_agent_4
bash /opt/agent/get_secrets.sh

@jmikedupont2
Copy link
Owner Author

DenyLoginSubtask
"Twitter rejected this login attempt as suspicious"
https://help.x.com/en/managing-your-account/locked-out-after-too-many-login-attempts
https://www.reddit.com/r/Twitter/s/kNtz81F4rb

try this

OK I GOT IN!! OP is kinda right with their instructions but this is what I did to bypass it:

Logging in with the CORRECT password just kept sending me to the suspicious login page so don’t do that. And from what I’ve seen with others, it won’t resolve, even contacting twitter support will be no help.

Try logging into your account and click forgot password. Then, just insert all your details. Next, I just chose the “I forgot password for a different reason”. They will then ask for a verification code (if ur 2FA is on), then I inserted my code then BAM I FINALLY GOT IN. 

I don’t know if it will work without the 2FA feature off? That seemed to be the common denominator between me and OP’s issue.ine was just with the iOS setting version instead of AUTHY but I now changed it to Authy 😁😁

@jmikedupont2
Copy link
Owner Author

Resource handler returned message: "Value (us-west-1a) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-west-1b, us-west-1c. (Service: Ec2, Status Code: 400, Request ID: aa049c5c-5cdd-4daa-a435-86538070a0ac)" (RequestToken: 950d7620-5d7a-8826-262d-2fd96c207227, HandlerErrorCode: InvalidRequest)

going to add

AvailabilityZone:
    Type: "String"
    Description: 'is appended to region name to create az'
    Default: "a"

to template

mike dupont added 2 commits February 5, 2025 10:01
@jmikedupont2
Copy link
Owner Author

jmikedupont2 commented Feb 5, 2025

@jmikedupont2
Copy link
Owner Author

Notes from todays debug session

    1  docker ps
    2  docker logs
    3  docker logs agent-docker.service
    4  cat /var/run/agent/secrets/env
    5  grep testzos /opt/agent/strace.log
    6  grep testzos /opt/agent/strace.log -C20
    7  docker ps
    8  docker restart agent-docker.service
    9  docker logs -f agent-docker.service
   10  docker stop agent-docker.service
   11  cd /opt/agent
   12  bash ./get_secrets.sh
   13  bash ./rundocker.sh
   14  cat get_secrets.sh
   15  export AGENT_NAME=tine_agent_4
   16  bash ./get_secrets.sh
   17  cat /var/run/agent/secrets/env
   18  docker restart agent-docker.service
   19  docker start agent-docker.service
   20  bash ./rundocker.sh
   21  docker logs -f agent-docker.service
   22  grep testzos /opt/agent/strace.log -C20
   23  grep -i twitter strace.log
   24  grep -i twitter strace.log -C3
   25  docker restart agent-docker.service
   26  docker logs -f agent-docker.service
   27  history

@jmikedupont2
Copy link
Owner Author

order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit https://aws.amazon.com/marketplace/pp?sku=aafjaej85im1fd4mwj2zub997",
"requestParameters": {
"autoScalingGroupName": frankfurt

@jmikedupont2
Copy link
Owner Author

#35 We found a new issue in case the service roles was created manually it wont deploy, need to make more flexible

@jmikedupont2
Copy link
Owner Author

ap-se-1 takes 337 second to boot docker

@jmikedupont2
Copy link
Owner Author

The file that is refrerenced for the char is characters/tine-test.character.json
https://github.com/meta-introspector/cloud-deployment-eliza/blob/feature/tine-devops-variables/characters/tine-test.character.json

for this repo
https://github.com/meta-introspector/cloud-deployment-eliza/blob/feature/tine-devops-variables/characters/tine-test.character.json

check out this branch
/feature/tine-devops-variables

edit this file:
characters/tine-test.character.json

Use your gitrepo name as a parameter on deploy

@jmikedupont2
Copy link
Owner Author

sudo su -
cd /opt/agent
git remote add myname https://github.com/meta-introspector/cloud-deployment-eliza/
git pull myname 
git checkout feature/tine-devops-variables
AGENT_NAME=tine_agent_4 bash ./rundocker.sh
docker logs -f agent-docker.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant