Setup p0 on your on-prem server on Amazon AWS via AMI

Welcome to the on-premise installation instructions for p0 on AWS. Follow this guide to get set up with your own version of p0.

  1. Go to AWS Console: https://console.aws.amazon.com/console/home

  2. Login

  3. Select the Region of your installation.

  4. Go to EC2 —> Instances —> Launch New Instance

  5. Give your instance a Name: p0-platform

  6. Select “Browse more AMIs”

  1. Click on “Community AMIs”

  2. Search for p0-visibility-dashboard

  1. Click Select

  2. You can select the following instance type:

    1. t2.xlarge (4 CPUs and 16 GiB memory)

  3. Take note of the key pair (or create a new one). You can use this to SSH into the box later.

  1. In Network Settings you can create a new SecurityGroup or re-use an old one. Just make sure that

    1. You can SSH into the server

    2. The server can make requests to any of the public facing domains that you want to see are reachable / have API endpoints behind them

    3. You can access the instance's IP from your browser

  2. Go to Configure Storage

    1. This depends on the number of repositories that you have, but we recommend you start with 100GB of disk space. We need enough disk space to check out your organization’s repositories.

  1. [Optional] Select an IAM instance profile.
    Note: This step is required only if you are providing access to Bedrock via an IAM role. Otherwise, you can skip this step.

  1. Then press Launch Instance

  2. Wait a few minutes. The instance will launch and you will see the below status for your EC2 Instance. Note that Public IPv4 address is optional.

  1. Visit the IP address.

  2. Initially you will see the below as the P0 service comes up. Just wait for 5 minutes and re-visit the IP.

  1. When you visit you should see the below. Follow the steps in the product for the rest of onboarding.

Setup p0 on AWS Linux 2

Welcome to the on-premise installation instructions for p0 on AWS. Follow this guide to get set up with your own version of p0.

  1. Go to AWS Console: https://console.aws.amazon.com/console/home

  2. Login

  3. Select the Region of your installation.

  4. Go to EC2 —> Instances —> Launch New Instance

  5. Give your instance a Name: p0-platform

  6. Select Amazon Linux

  7. Then select Amazon Linux 2 AMI (HVM) - Kernel 5.10 machine

  1. You can select the following instance type:

    1. t2.xlarge (4 CPUs and 16 GiB memory)

  2. Connect to instance configuration:

  1. Key pair: Take note of the key pair name (or create a new one). You can use this to SSH into the box later (see Key pair configuration screenshot below)

  1. AWS Session Manager: If you already have an instance profile for Systems Manager, select it under the Advanced details section. (See Advanced details screenshot below).
    Note: In case you want to create a new profile, open this link and follow the steps mentioned under the section "To create an instance profile for Systems Manager managed instances (console)".

  1. We also need to provide Bedrock access to this role. We need to create a Policy for limited Bedrock access and attach the same to above mentioned role.

    1. Go to Policies from left-sidebar.

    2. Select Create policy from top-right of the Policies page.

    3. On Policy page, select JSON tab on Policy editor header to add a policy in JSON format.

    4. Copy and paste the policy mentioned below in the Policy editor. In case your region of AWS instance is different, edit it in the policy below under Resources attribute where it says us-west-2.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "Invocation", "Effect": "Allow", "Action": [ "bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream" ], "Resource": [ "arn:aws:bedrock:us-west-2::foundation-model/mistral.mixtral-8x7b-instruct-v0:1" ] } ] }

{ "Version": "2012-10-17", "Statement": [ { "Sid": "Invocation", "Effect": "Allow", "Action": [ "bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream" ], "Resource": [ "arn:aws:bedrock:us-west-2::foundation-model/mistral.mixtral-8x7b-instruct-v0:1" ] } ] }

{ "Version": "2012-10-17", "Statement": [ { "Sid": "Invocation", "Effect": "Allow", "Action": [ "bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream" ], "Resource": [ "arn:aws:bedrock:us-west-2::foundation-model/mistral.mixtral-8x7b-instruct-v0:1" ] } ] }

  1. Click Next at the bottom-right of the page

  2. Add the Policy name. Make sure to remember this as it will be used later. You can leave the rest of the settings as is.

  3. Hit Create policy button at the end of the page.

  4. You'll be redirected to Policies page. Now go to Roles page from the left-sidebar.

  5. Search for the Role you want to attach or you have alread attached to EC2 instance.

  6. Click on the role to go to roles page. Look for add Add Permission in middle right of the page.

  7. In the dropdown, select Attach Policies. You will be take to Attach Policy to Role screen.

  1. Here, search for the policy you just created in above steps and attach it. Click Add Permission

  1. In Network Settings you can create a new SecurityGroup or re-use an old one. Just make sure that:

    1. You can connect to the EC2 instance via SSH or using AWS Session Manager.

    2. The server can make requests to any of the public facing domains that you want to see are reachable / have API endpoints behind them

    3. You can access the instance's IP from your browser

  2. Go to Configure Storage

    1. This depends on the number of repositories that you have, but we recommend you start with 100GB of disk space. We need enough disk space to check out your organization’s repositories.

  1. Then press Launch Instance

  2. Wait a few minutes. The instance will launch and you will see the below status for your EC2 Instance. Note that Public IPv4 address is optional.

  1. Ensure IAM role which is you created above is attached on this screen. Look for IAM Role at bottom-left of the above screen. Also, we need to enable Metadata Services for this EC2 instance so that we can create temporary token within EC2 instance to access Bedrock.

    1. If role is not already attached to this instance, click on Actions dropdown from top-right, Go to Security option, and select Modify IAM role.

    2. You'll be taken to Modify IAM role page for that instance. Search and select the newly created role and click Update IAM role.

  2. Click on the Connect button from top-right of the instance summary page to connect to the instance. (refer screenshot above)

  3. Once you're connected to the EC2 instance terminal, switch to the directory where you would like to install p0. Then execute the below mentioned commands in the given order.
    Note: The user must have sudo access as well as write access in the directory where p0 will be installed. This process may take 3-4 mins to complete.

mkdir p0-visibility-dashboard

mkdir p0-visibility-dashboard

mkdir p0-visibility-dashboard

cd p0-visibility-dashboard

cd p0-visibility-dashboard

cd p0-visibility-dashboard

curl -X GET "https://p0-public-bucket.s3.ap-south-1.amazonaws.com/amiSetup/awsLinux2/initAMI.sh" | bash -

curl -X GET "https://p0-public-bucket.s3.ap-south-1.amazonaws.com/amiSetup/awsLinux2/initAMI.sh" | bash -

curl -X GET "https://p0-public-bucket.s3.ap-south-1.amazonaws.com/amiSetup/awsLinux2/initAMI.sh" | bash -

  1. Once completed, you'll see a message from the terminal like the screenshot below.

  1. And now you can visit the IP address from your instance page.

  2. Initially you will see the below as the p0 service comes up. Just wait for 5 minutes and re-visit the IP.

  1. When you visit you should see the below. Follow the steps in the product for the rest of onboarding.

Contact us

If you are facing any trouble setting up your on-prem application, reach out to us at contact[at]p0[dot]inc

Contact us

If you are facing any trouble setting up your on-prem application, reach out to us at contact[at]p0[dot]inc

Contact us

If you are facing any trouble setting up your on-prem application, reach out to us at contact[at]p0[dot]inc

© 2024 p

0

. All rights reserved.

© 2024 p

0

. All rights reserved.

© 2024 p

0

. All rights reserved.