From 64a93e6cc183979b69614e6b7a37c399b3fa856b Mon Sep 17 00:00:00 2001 From: Julian Sommer <115516918+juliansommer@users.noreply.github.com> Date: Fri, 3 Jul 2026 13:40:35 +1000 Subject: [PATCH] chore: merge creating accounts doc --- .../spinifex-admin-cli/README.md | 32 ++++++- docs/identity/creating-accounts/README.md | 96 ------------------- .../identity/iam-users-and-policies/README.md | 2 +- 3 files changed, 31 insertions(+), 99 deletions(-) delete mode 100644 docs/identity/creating-accounts/README.md diff --git a/docs/administration/spinifex-admin-cli/README.md b/docs/administration/spinifex-admin-cli/README.md index 9c86308df..594c29c0a 100644 --- a/docs/administration/spinifex-admin-cli/README.md +++ b/docs/administration/spinifex-admin-cli/README.md @@ -35,20 +35,48 @@ All services in the Spinifex platform are managed through this single binary. ## Account Management -Create a new isolated account with an admin user and AdministratorAccess policy: +Create a new isolated account. This provisions a sequential 12-digit account ID, an `admin` user with an `AdministratorAccess` policy attached, and an access key pair. The credentials are written to `~/.aws/credentials` and `~/.aws/config` under a `spinifex-` profile automatically. Requires a running cluster; run from a cluster node: ```bash spx admin account create --name myteam +``` + +``` +Account created successfully! + Account ID: 000000000002 + Account Name: myteam + Admin User: admin + Access Key ID: AKIA1A2B3C4D5E6F7890ABCD + Secret Access Key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + AWS Profile: spinifex-myteam + +Use with: + AWS_PROFILE=spinifex-myteam aws ec2 describe-instances +``` + +> **The secret access key is only shown once.** It is saved to `~/.aws/credentials` on the node where you ran the command; copy it from there if you need it elsewhere. + +Set the profile to start using the account: + +```bash export AWS_PROFILE=spinifex-myteam ``` +To create additional users and scoped permissions within the account, see [IAM Users and Policies](/docs/iam-users-and-policies). + List all accounts: ```bash spx admin account list ``` - +``` +ACCOUNT ID NAME STATUS CREATED +---------- ---- ------ ------- +000000000000 system ACTIVE 2026-07-03 02:17 +000000000001 spinifex ACTIVE 2026-07-03 02:17 +000000000002 myteam ACTIVE 2026-07-03 03:32 +``` ## Node Management diff --git a/docs/identity/creating-accounts/README.md b/docs/identity/creating-accounts/README.md deleted file mode 100644 index 6a5e33b5c..000000000 --- a/docs/identity/creating-accounts/README.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: "Creating Accounts" -description: "Create and manage isolated user accounts with their own resources." -category: "Identity" -tags: - - accounts - - iam - - admin -resources: - - title: "Spinifex Repository" - url: "https://github.com/mulgadc/spinifex" ---- - -# Creating Accounts - -> Create and manage isolated user accounts with their own resources. - -## Table of Contents - -- [Overview](#overview) -- [Instructions](#instructions) -- [Troubleshooting](#troubleshooting) - ---- - -## Overview - -Spinifex supports multi-tenant account isolation. Each account gets its own IAM credentials, AWS CLI profile, and isolated resource namespace. - -Creating an account provisions a sequential 12-digit account ID, an `admin` user with an `AdministratorAccess` policy attached, and an access key pair. The credentials are written to `~/.aws/credentials` and `~/.aws/config` under a `spinifex-` profile automatically. - -## Instructions - -## Create Account - -Requires a running cluster. Run from a cluster node: - -```bash -spx admin account create --name myteam -``` - -``` -Account created successfully! - Account ID: 000000000002 - Account Name: myteam - Admin User: admin - Access Key ID: AKIA1A2B3C4D5E6F7890ABCD - Secret Access Key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - AWS Profile: spinifex-myteam - -Use with: - AWS_PROFILE=spinifex-myteam aws ec2 describe-instances -``` - -> **The secret access key is only shown once.** It is saved to `~/.aws/credentials` on the node where you ran the command; copy it from there if you need it elsewhere. - -Set the profile to start using the account: - -```bash -export AWS_PROFILE=spinifex-myteam -aws sts get-caller-identity -``` - -To create additional users and scoped permissions within the account, see [IAM Users and Policies](/docs/iam-users-and-policies). - -## List Accounts - -```bash -spx admin account list -``` - -``` -ACCOUNT ID NAME STATUS CREATED ----------- ---- ------ ------- -000000000000 system ACTIVE 2026-07-03 02:17 -000000000001 spinifex ACTIVE 2026-07-03 02:17 -000000000002 myteam ACTIVE 2026-07-03 03:32 -``` - -## Troubleshooting - -## Credentials Not Working - -Verify the AWS CLI configuration files exist and contain the correct profile: - -```bash -cat ~/.aws/config -cat ~/.aws/credentials -``` - -Ensure the `AWS_PROFILE` environment variable matches the profile name: - -```bash -echo $AWS_PROFILE -export AWS_PROFILE=spinifex-myteam -``` diff --git a/docs/identity/iam-users-and-policies/README.md b/docs/identity/iam-users-and-policies/README.md index f733d04d9..c90b74742 100644 --- a/docs/identity/iam-users-and-policies/README.md +++ b/docs/identity/iam-users-and-policies/README.md @@ -46,7 +46,7 @@ When you create an account with `spx admin account create`, Spinifex bootstraps ## Prerequisites - A running Spinifex cluster with the AWS gateway started -- An account created via `spx admin account create` (see [Creating Accounts](/docs/creating-accounts)) +- An account created via `spx admin account create` (see [Spinifex Admin CLI](/docs/spinifex-admin-cli)) - AWS CLI configured with the account's profile: ```bash