Getting Started

...
  • Accounts
About 4 min

# Getting Started

  1. Download the Commandeer app for Mac, Windows, or Linux.
    1. Direct Download
    2. Linux Snap Store
  2. Go through onboarding to agree to our terms, and set your options
  3. Setup your first account

# Anatomy of an Account

There are two different types of accounts in Commandeer. The first is a local account, which connects to LocalStack instead of directly to AWS. This let’s you run all your AWS services locally, if you still want to add tokens for Slack, Algolia, Sendgrid, Twilio, or other services you still can which makes it easy to run a semi-local environment for services that do not have a local representation. The second is an entirely cloud account. This allows you to connect to AWS, Algolia, Slack, etc.

There are two different use cases that I have run across in this type of setup. The first is if you are running say development and production in the same AWS account but in different regions. You would either set this up as having an account called something like my-company-dev and my-company-prod where dev is in US West 1 and prod is in US East 1. You would then not need to switch between regions in the top section, but just switch accounts.

Alternatively, you could just setup one account called say, my-company. And then switch between US West 1 and US East 2 in the top section. Both ways are valid, and it is more of a personal preference as to how you would like to operate. Also remember, there are a few services like IAM and S3 that are actually global, so the users, roles, groups, and S3 buckets will show up regardless of what region you select.

Below you can see an example of my local account. It shows you the services that are connected, and allows you to edit accounts.

Commandeer Local AccountIf you are a developer that works for multiple clients, or have multiple environments, this setup can be very helpful. Let’s say you use Dynamo, S3, Lambda, Algolia, and Sendgrid for a system you have built. You can then add an account called my-sweet-company-dev that uses keys to connect to AWS, Algolia, and Sendgrid development accounts. You can also then connect your staging environment as another account named my-sweet-company-stg that has keys to a staging environment for AWS, Algolia and Sendgrid. With this setup, you could also then connect the same key to Slack, so that it can write messages to the slack channels of your choosing.

This is nice as most companies have just one slack environment, but have multiple system environments. The third setup in this situation could then be my-sweet-company-local which if it is set to Local, it will point all AWS services to LocalStack to a copy of the AWS system. Unfortunately, many cloud services do not have a mocked local environment like AWS does by using LocalStack, but not to worry, Commandeer can give you a hybrid setup. So the LocalStack urls get defined to point to local instead of AWS, and then for Algolia and Sendgrid you could just point to the development environment with those keys.

One note, for things that actually have data like Algolia, you will want to point to either a different account from dev, or point to the same one, but pre or postfix your indexes. For example, if you have multiple indexes in Algolia, you can call them user-local and user-dev but have them in the same account.

# Backing up your Commandeer Accounts to GitHub

Your account settings for each account you create in Commandeer is stored in flat file on your computer. You can go to the top right help icon in the app, to view the location of this directory. Below you can see the help menu, with a link to your data directory.

Commandeer Help Menu

Once you click on the Data Path link, it will open up your Finder or Windows Explorer. If you navigate to the accounts folder, you will see json files for each account that you have in Commandeer.

Clicking into the folder will bring you to the json files.

You can simply setup a repo in GitHub to track this folder. Because these files are stored in plaintext, you do want to be careful with this. We recommend not connecting to production through Commandeer, and if you must, we recommend using a Session Token so that your keys are short-lived. If we open that local account file, you can see the json data.

{
    "autoExecuteHistory": true,
    "isLocal": true,
    "isProduction": false,
    "id": "d9fa2188-7e9d-46d8-b8fc-062474727f1a",
    "name": "local",
    "createdAt": "2021-02-13T12:27:55.027Z",
    "algolia": {
        "applicationId": "",
        "apiKey": ""
    },
    "appSync": {
        "id": "408cd8d3-53a1-410f-979f-b1b4daabbee9"
    },
    "athena": {
        "id": "0629364f-4130-4663-81e1-f9e2eda21333",
        "s3OutputLocation": ""
    },
    "aws": {
        "localKey": "LOCAL",
        "id": "8f203d44-9c64-4c7d-a096-198421ad6c10",
        "region": "us-east-1",
        "accessKeyId": "NO_LOCAL_ACCESS_KEY_ID",
        "secretAccessKey": "NO_LOCAL_SECRET_ACCESS_KEY",
        "apigatewayEndpoint": "http://localhost:4566",
        "appSyncEndpoint": "http://localhost:4566",
        "billingEndpoint": "http://localhost:4566",
        "cloudFormationEndpoint": "http://localhost:4566",
        "cloudwatchEndpoint": "http://localhost:4566",
        "cloudwatchLogsEndpoint": "http://localhost:4566",
        "cloudwatchEventsEndpoint": "http://localhost:4566",
        "cognitoEndpoint": "http://localhost:4566",
        "dynamoEndpoint": "http://localhost:4566",
        "ec2Endpoint": "http://localhost:4566",
        "ecsEndpoint": "http://localhost:4566",
        "iamEndpoint": "http://localhost:4566",
        "lambdaEndpoint": "http://localhost:4566",
        "snsEndpoint": "http://localhost:4566",
        "sqsEndpoint": "http://localhost:4566",
        "s3Endpoint": "http://localhost:4566",
        "s3Prefix": ""
    },
    "dynamo": {
        "id": "96f11161-799d-4027-8a1a-1a4054b2b488",
        "autoLoadRelationshipData": false,
        "streamTesterTimeoutSeconds": 15
    },
    "firebase": {
        "databaseUrl": "DEFAULT_FIREBASE_URL"
    },
    "postgres": {
        "id": "0e966c78-6a63-4f6e-b086-80ac230b6e0b",
        "host": "",
        "port": 5432,
        "initialDatabase": "",
        "username": "",
        "password": "",
        "type": "POSTGRES"
    },
    "redis": {
        "host": "",
        "port": 6379
    },
    "sendgrid": {
        "apiKey": "",
        "fromEmailAddress": ""
    },
    "slack": {
        "token": ""
    },
    "twilio": {
        "accountSid": "",
        "authToken": "",
        "fromPhoneNumber": ""
    },
    "ansible": {
        "id": "206d0782-ba7f-493e-8ec4-9a1c8c3df5a6",
        "variables": [],
        "environmentVariables": []
    },
    "bash": {
        "environmentVariables": [],
        "id": "79b0b784-ffa1-4323-b252-d27fc51d4c25",
        "debugger": false,
        "verbose": false,
        "login": false,
        "dumpStrings": false,
        "dumpPoStrings": false,
        "interactive": false,
        "noEditing": false,
        "noProfile": false,
        "noRc": false,
        "posix": false,
        "restricted": false
    },
    "circleci": {
        "id": "dff40997-7ea8-4a17-8491-acac488d83f2",
        "environmentVariables": [],
        "volumes": []
    },
    "dockerCompose": {
        "environmentVariables": [],
        "id": "03826cde-1500-48c1-a77c-2b035b65fdb7",
        "verbose": false,
        "noAnsi": false,
        "tls": false,
        "tlsVerify": false,
        "skipHostnameCheck": false,
        "compatibility": false
    },
    "dockerExec": {
        "id": "56d18bb5-3768-49bc-89b3-a01b45ad8f50",
        "attachStdin": false,
        "attachStdout": true,
        "attachStderr": true,
        "tty": false,
        "environmentVariables": [],
        "privileged": false
    },
    "localstack": {
        "id": "39599bc2-af36-4b2b-b0bd-b7296fb63196",
        "autoRemove": false,
        "dockerImageName": "localstack/localstack:0.12.5",
        "dockerContainerId": "478b922708f7e6c607a3f27b6cbe38b39a9593f929df81c42c7240fccf259db3",
        "url": "http://localhost:4566",
        "environmentVariables": []
    },
    "serverless": {
        "enableS3Acceleration": false,
        "force": false,
        "hideSecrets": false,
        "verbose": false,
        "dashboardApp": false,
        "dashboardOrg": false,
        "environmentVariables": [],
        "id": "084a56db-a01a-4f5f-b312-a024f401ea05",
        "dockerImageName": "softinstigate/serverless:2.19.0",
        "stage": "local"
    }
}

These files are never stored on our servers, they only exist in your environment, so how you want to back them up is up to you.

Last update: May 11, 2021 14:29