Getting started overview

Buddy is a continuous integration and continuous delivery (CI/CD) platform that facilitates the automation of software development processes, from building and testing code to deploying applications. Its visual pipeline builder and direct integrations aim to simplify CI/CD for developers and technical teams. This guide outlines the initial steps to get started with Buddy, focusing on account creation, credential setup, and executing a foundational deployment.

The process typically involves:

  1. Account Creation: Registering for a Buddy account.
  2. Project Setup: Creating a new project and linking it to a version control repository.
  3. Pipeline Configuration: Designing a deployment pipeline using Buddy's visual interface.
  4. Execution: Running the configured pipeline to perform an automated action.

Buddy supports integrations with various cloud providers, version control systems like GitHub and GitLab, and container registries. Understanding how CI/CD platforms function, particularly the concepts of pipelines and webhooks, can be beneficial when configuring your first project. For example, webhooks are commonly used to trigger CI/CD pipelines automatically on events such as code pushes to a repository, as detailed in AWS CodePipeline webhook documentation.

Create an account and get keys

To begin using Buddy, you must first create an account and then generate access keys if you intend to interact with the platform programmatically via its API.

Step 1: Sign up for a Buddy account

  1. Navigate to the Buddy homepage.
  2. Click the 'Get Started Free' or 'Sign Up' button.
  3. You can register using your email address, or by authenticating through a supported version control service such as GitHub, GitLab, or Bitbucket. Using a version control service can streamline the process of connecting your repositories later.
  4. Follow the on-screen prompts to complete the registration. If registering via email, you may need to verify your email address.

Step 2: Generate API keys (Optional, for programmatic access)

If your initial goal is to build a deployment pipeline through the Buddy UI, you may not immediately need API keys. However, for advanced use cases, such as integrating Buddy with other systems or automating project creation, API keys are essential. Buddy's API allows for programmatic control over projects, pipelines, and deployments, as described in the Buddy API documentation.

  1. Log in to your Buddy account.
  2. From the dashboard, click on your avatar or user icon in the top right corner.
  3. Select 'API' or 'API Keys' from the dropdown menu.
  4. Click 'Add a new API key'.
  5. Provide a descriptive name for your API key (e.g., 'CI/CD Automation Key').
  6. Define the permissions for the API key. It is a security best practice to grant only the minimum necessary permissions for the intended task. For example, if the key is only for triggering deployments, restrict its scope to deployment-related actions.
  7. Click 'Generate Key'.
  8. The API key will be displayed once. Copy it immediately and store it securely. Buddy will not display the full key again for security reasons. Treat API keys as sensitive credentials, similar to passwords, to prevent unauthorized access to your CI/CD operations.

Your first request

For your first request, we'll configure a simple pipeline to deploy a static website or a basic application to a hosting service. This example assumes you have an existing code repository (e.g., on GitHub) with a simple web project.

Scenario: Deploying a static website to an S3 bucket

This example demonstrates deploying a static website from a GitHub repository to an Amazon S3 bucket. You will need an AWS account and a configured S3 bucket for this.

Step 1: Create a new project in Buddy

  1. Log in to your Buddy account.
  2. From the dashboard, click 'Create a new project'.
  3. Select your version control provider (e.g., GitHub, GitLab). You will be prompted to authorize Buddy to access your repositories if you haven't already.
  4. Choose the repository containing your static website code.
  5. Buddy will automatically suggest a starting pipeline template. You can choose to skip this for now or select a basic static website template if available.

Step 2: Configure the deployment pipeline

  1. After creating the project, you'll be directed to the pipeline configuration screen. Click 'Add a new pipeline'.
  2. Name your pipeline: Give it a descriptive name, like 'Deploy Static Website'.
  3. Trigger Mode: Set the trigger mode. For a typical CI/CD workflow, 'On push' is common, meaning the pipeline will run automatically whenever changes are pushed to a specified branch (e.g., main).
  4. Add Actions: Click the '+' icon to add an action to your pipeline.
  5. Build Action (Optional): If your static site requires a build step (e.g., using npm for JavaScript projects), add a 'Node.js' or 'Custom Build' action first. Configure it to run your build commands (e.g., npm install && npm run build).
  6. Deployment Action: Search for and select the 'Amazon S3' action.
  7. Configure S3 Action:
    • Authentication: You'll need to provide AWS credentials. It's recommended to use IAM roles with specific permissions for security. Alternatively, you can enter your AWS Access Key ID and Secret Access Key. Ensure these credentials have permissions to write to your S3 bucket, as outlined in AWS Access Keys best practices.
    • Bucket Name: Enter the exact name of your S3 bucket.
    • Source Path: Specify the local path in your Buddy workspace where your static website files are located after any build steps (e.g., ./build or ./dist).
    • Destination Path: Leave this empty to upload to the root of the bucket, or specify a subfolder.
    • Additional Settings: Configure options like 'Remove files from S3 that are not in source path' to synchronize content, and 'Set public-read ACL' if your website needs to be publicly accessible.
  8. Click 'Add this action' to save the S3 deployment.
  9. Click 'Save Pipeline' to finalize your pipeline configuration.

Step 3: Run your first deployment

Once the pipeline is saved, you can trigger it manually or push a change to your linked repository's main branch if you configured an 'On push' trigger.

  1. To trigger manually, navigate to your project and click the 'Run' button next to your pipeline name.
  2. Monitor the pipeline execution log in the Buddy UI. It will show the progress of each action.
  3. Upon successful completion, your static website files will be deployed to your S3 bucket. You can verify this by checking your S3 bucket in the AWS console or by accessing your website's public URL if configured.

Quick Reference: First Deployment Steps

Step What to Do Where
1. Create Account Sign up using email or VCS Buddy homepage
2. Create Project Link a code repository Buddy Dashboard > New Project
3. Add Pipeline Define trigger and actions Project View > Add Pipeline
4. Configure Actions Add Build (optional) and Deployment (e.g., S3) actions with credentials Pipeline Editor
5. Run Pipeline Trigger manually or via code push Pipeline View > Run Button

Common next steps

After successfully completing your first deployment, consider these common next steps to enhance your Buddy CI/CD workflow:

  • Add More Actions: Integrate additional steps into your pipelines, such as running unit tests, linting code, or deploying to multiple environments (staging, production). Buddy offers a wide range of actions for various programming languages, tools, and cloud providers, as detailed in the Buddy Actions documentation.
  • Environment Variables: Store sensitive information like API keys, database credentials, or environment-specific configurations as environment variables within Buddy. This practice improves security and makes pipelines more flexible, allowing them to adapt to different deployment targets without code changes.
  • Notifications: Configure notifications to receive alerts on pipeline success or failure. Buddy integrates with communication tools like Slack, email, and custom webhooks.
  • Parallel Executions: For larger projects, optimize pipeline execution time by configuring parallel actions, allowing multiple tasks to run concurrently.
  • Branch-Specific Pipelines: Create separate pipelines or conditional actions that run only for specific branches (e.g., a more rigorous test suite for the main branch).
  • Advanced Deployment Strategies: Explore advanced deployment patterns like blue/green deployments or canary releases if your application requires high availability and minimal downtime during updates.
  • Buddy API Integration: If you generated an API key, consider using the Buddy API to programmatically manage projects, trigger pipelines, or integrate Buddy with other internal systems.

Troubleshooting the first call

Encountering issues during your initial Buddy pipeline execution is common. Here are some troubleshooting tips for a first deployment:

  • Check Logs: The most crucial step is to review the pipeline execution logs in the Buddy UI. Buddy provides detailed output for each action, highlighting errors, warnings, and successful steps. Look for specific error messages that can guide your debugging.
  • Version Control Configuration:
    • Ensure Buddy has the correct permissions to access your repository. You might need to re-authenticate your version control provider.
    • Verify that the correct branch is selected for your pipeline trigger.
  • Action Configuration:
    • Credentials: Double-check all credentials (e.g., AWS access keys, SSH keys, API tokens) for typos or incorrect values. Ensure they have the necessary permissions for the target service (e.g., S3 write permissions).
    • Paths: Verify file paths specified in build or deployment actions (e.g., source path, destination path) are correct relative to your repository's root or the build output directory.
    • Commands: If using custom build commands, ensure they are syntactically correct and would run successfully in a local development environment.
  • Network and Firewall Issues: If deploying to a self-hosted server, ensure Buddy's IP addresses are whitelisted in your server's firewall rules. Consult Buddy's IP address documentation for the list of addresses.
  • Environment Variables: If using environment variables, confirm they are correctly defined and referenced within your pipeline actions. Ensure sensitive variables are marked as such.
  • Timeout Errors: If a pipeline action times out, it might indicate a long-running process, an infinite loop in a script, or a network connectivity issue to an external service. Review the action's configuration and the service it's interacting with.
  • Community and Support: If you're stuck, consult the Buddy documentation or their support channels.