A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.sourcegraph.com/admin/deploy/machine-images/aws-ami below:

Sourcegraph AWS AMI instances - Sourcegraph docs

Sourcegraph AWS AMI instances

Sourcegraph Amazon Machine Images (AMIs) allow you to quickly deploy a production-ready Sourcegraph instance tuned to your organization's scale in just a few clicks.

Following these docs will provision the following resources:

Sourcegraph AMI account ID

All Sourcegraph AMIs are published from one of the following AWS accounts:

Instance sizing

Refer to our AWS Instance Sizing guide to determine the appropriate EC2 instance type for your Sourcegraph deployment based on the number of users and repositories.

Click here to see the completed list of AMI IDs published in each region.

The default AMI username is ec2-user.

Deploy Sourcegraph
  1. Search for Sourcegraph in the AWS Marketplace or AMI catalog (see screenshot in the introduction).
  2. Choose Launch instance from AMI.
  3. Name your instance.
  4. Select an instance type according to our sizing guide or your specific requirements.
  5. Key pair (login): Select or create a new Key Pair for connecting to your instance securely (this may be required in the event you need support).
  6. Network settings:
  7. Configure storage:
  8. Click Launch instance, and navigate to the public IP address in your browser. (Look for the IPv4 Public IP value in your EC2 instance page under the Description panel.)

Once the instance has started, please allow ~5 minutes for Sourcegraph to initialize. During this time you may observe a 404 page not found response.

To configure SSL, and lock down the instance from the public internet, see the networking section.

Executors

Executors are supported using native kubernetes executors.

Executors support auto-indexing and server-side batch changes.

To enable executors you must do the following:

  1. Connect to the AMI instance using ssh
  2. Run cd /home/ec2-user/deploy/install/
  3. Replace the placeholder executor.frontendPassword in override.yaml
  4. Run the following command to update the executor
helm upgrade -i -f ./override.yaml --version "$(cat /home/ec2-user/.sourcegraph-version)" executor ./sourcegraph-executor-k8s-charts.tgz
  1. Add the following to the site-admin config using the password you chose previously
"executors.accessToken": "<exector.frontendPassword>",
"executors.frontendURL": "http://sourcegraph-frontend:30080",
"codeIntelAutoIndexing.enabled": true
  1. Check Site-Admin > Executors > Instances to verify the executor connected successfully. If it does not appear try reboot the instance

To use server-side batch changes you will need to enable the native-ssbc-execution feature flag.

Networking

We suggest using an AWS Application Load Balancer (ALB) to manage HTTPS connections to Sourcegraph. This makes managing SSL certificates easy.

Creating an AWS Load Balancer
  1. Request a certificate for the domain name in AWS Certificate Manager.
  2. Create a target group for HTTPS Port 443 that links to the instance's Port 443.
  3. Create a new subnet inside the instance VPC.
  4. Create a new Application Load Balancer via AWS Load Balancers.
Step 1: Request certificate

Open the AWS Certificate Manager console to Request a certificate:

After the certificate has been created, you will need to attach the CNAME name and CNAME values to your DNS.

Follow the steps below to attach the CNAME to your DNS if your DNS is hosted in AWS route 53:

  1. Click Create record in route 53 in the certificate dashboard.
  2. Select the DNS you would like to attach the certificate to.
  3. Click Create records once you have verified the information is correct.
  4. Wait ~30 minutes before the validation is completed.
Step 2: Create a target group
  1. Click Create a target group on your EC2 Target groups dashboard
  2. Click Include as pending below
Step 3: Create subnets

Click Create subnet in your VPC subnets dashboard:

Step 4: Create an Application Load Balancer
  1. Open your EC2 Load Balancers dashboard to Create Load Balancer.
  2. Choose Application Load Balancer as the Load balancer types using the following configurations:
Securing your instance

Configure user authentication (SSO, SAML, OpenID Connect, etc.) to give users of your Sourcegraph instance access to it.

Now that your instance is confirmed to be working, and you have HTTPS working through an Amazon load balancer, you may choose to secure your Sourcegraph instance further by modifying the security group/firewall rules to prevent access from the public internet. You can do this by modifying the security group/firewall rules.

Upgrade

Please take time to review the following before proceeding with the upgrades:

Step 1: Stop the current instance
  1. Stop your current Sourcegraph AMI instance
  2. Detach the non-root data volume (Device name: /dev/sdb/)
  3. Make a note of the VPC name
Step 2: Launch a new instance
  1. Launch a new Sourcegraph instance from an AMI with the latest version of Sourcegraph
  2. Name the instance
  3. Select the appropriate instance type
  4. Under Key Pair
  1. Under Network settings
  2. Under Configure storage
  1. After reviewing the settings, click Launch Instance
  2. Attach the detached volume to the new instance
  3. On the Attach volume page:
  1. Reboot the new instance

You can terminate the stopped Sourcegraph AMI instance once you have confirmed the new instance is up and running.

Downgrade

Please refer to the upgrade procedure above if you wish to roll back your instance.

Storage and Backups

We strongly recommend you taking snapshots of the entire EBS volume on an automatic, scheduled basis.

Additional resources

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4