Skip to content

Commit

Permalink
LibOps -> libops
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Jan 19, 2025
1 parent c4cee1e commit 02ddc2c
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: LibOps
github: libops
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# LibOps Documentation
# libops Documentation

Viewable at https://docs.libops.io

This repository contains the documentation for the LibOps platform.
This repository contains the documentation for the libops platform.

This repository also serves as an issue queue for any bugs or feature requests for LibOps.
This repository also serves as an issue queue for any bugs or feature requests for libops.


## Local docs development
Expand Down
36 changes: 18 additions & 18 deletions docs/development/cli.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# sitectl

[sitectl](https://github.com/LibOps/sitectl) is a useful utility to interact with your LibOps site.
[sitectl](https://github.com/libops/sitectl) is a useful utility to interact with your libops site.

## Install

### Prerequiste (gcloud)

`sitectl` requires Google Cloud's `gcloud` CLI to be installed and authenticated on the same machine you run `sitectl` commands from.

So before installing LibOps you must:
So before installing libops you must:

1. [Install the gcloud CLI](https://cloud.google.com/sdk/docs/install)
2. [Initialize the gcloud CLI](https://cloud.google.com/sdk/docs/initializing)
Expand All @@ -21,13 +21,13 @@ After `gcloud` is installed you can install `sitectl` using homebrew or a binary
You can install `sitectl` using homebrew

```
brew tap libops/homebrew https://github.com/LibOps/homebrew
brew tap libops/homebrew https://github.com/libops/homebrew
brew install libops/homebrew/sitectl
```

### Download Binary

Instead of homebrew, you can download a binary for your system from [the latest release](https://github.com/LibOps/sitectl/releases/latest)
Instead of homebrew, you can download a binary for your system from [the latest release](https://github.com/libops/sitectl/releases/latest)

Then put the binary in a directory that is in your `$PATH`

Expand All @@ -45,19 +45,19 @@ Usage:
Available Commands:
backup Backup your libops environment
completion Generate the autocompletion script for the specified shell
config-ssh Populate ~/.ssh/config with LibOps development environment
config-ssh Populate ~/.ssh/config with libops development environment
drush Run drush commands on your libops environment
get Display information about your LibOps environment.
get Display information about your libops environment.
help Help about any command
import Import resources to your LibOps environment.
sequelace Connect to your LibOps database using Sequel Ace (Mac OS only)
set Set information on your LibOps environment.
import Import resources to your libops environment.
sequelace Connect to your libops database using Sequel Ace (Mac OS only)
set Set information on your libops environment.
sync-db Transfer the database from one environment to another
Flags:
-e, --environment string LibOps environment (default "development")
-e, --environment string libops environment (default "development")
-h, --help help for libops
-p, --site string LibOps project/site (default "YOUR-LIBOPS-SITE")
-p, --site string libops project/site (default "YOUR-LIBOPS-SITE")
-v, --version version for libops
Use "sitectl [command] --help" for more information about a command.
Expand All @@ -75,9 +75,9 @@ sitectl backup -e production

### set developer

Use this command to add a developer to your LibOps site environments.
Use this command to add a developer to your libops site environments.

LibOps site environments and CLI commands are protected by a firewall and/or gcloud authentication. To provide access to a developer `[email protected]` who works from two locations with IP addresses `1.2.3.4` and `5.6.7.8` you could run the command:
libops site environments and CLI commands are protected by a firewall and/or gcloud authentication. To provide access to a developer `[email protected]` who works from two locations with IP addresses `1.2.3.4` and `5.6.7.8` you could run the command:

```
sitectl set developer \
Expand Down Expand Up @@ -108,7 +108,7 @@ That command will automatically read your gcloud authenticated email, SSH public

### drush

You can use `sitectl drush` to execute drush commands against your LibOps environment.
You can use `sitectl drush` to execute drush commands against your libops environment.

#### Reset super user password

Expand All @@ -126,7 +126,7 @@ sitectl drush -- cr

### sequelace

On Mac OS with [Sequel Ace](https://sequel-ace.com/) installed, running `sitectl sequelace` will open a connection to your LibOps development environment database. You could connect to production similarly via
On Mac OS with [Sequel Ace](https://sequel-ace.com/) installed, running `sitectl sequelace` will open a connection to your libops development environment database. You could connect to production similarly via

```
sitectl sequelace -e production
Expand All @@ -148,7 +148,7 @@ git push origin development

### get info

Running `sitectl get info` will return a JSON string containing connection information for different aspects of your LibOps environment:
Running `sitectl get info` will return a JSON string containing connection information for different aspects of your libops environment:

```
sitectl get info | jq .
Expand Down Expand Up @@ -184,15 +184,15 @@ sitectl get info | jq .

### backup

Running `sitectl backup` will backup the database for your LibOps environment. For example you could backup the production database by running:
Running `sitectl backup` will backup the database for your libops environment. For example you could backup the production database by running:

```
sitectl backup -e production
```

### import db

Running `sitectl import db` can get a SQL file on your local machine imported into a LibOps environment. For example, to import a SQL file called "drupal.sql" from your local machine to development you can run:
Running `sitectl import db` can get a SQL file on your local machine imported into a libops environment. For example, to import a SQL file called "drupal.sql" from your local machine to development you can run:

```
sitectl import db --file drupal.sql
Expand Down
28 changes: 14 additions & 14 deletions docs/development/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Developer Documentation

Here you will find all you need to know about developing and managing your site on LibOps.
Here you will find all you need to know about developing and managing your site on libops.

## Initial setup

Expand All @@ -18,7 +18,7 @@ sitectl --help

Your site's public URL, libops CLI commands ran against your site, and uploading code to an environment using SFTP, are all managed by [libops.yml](./yml.md)

A quick way to configure your working machine to properly authenticate to your LibOps site is by running this command:
A quick way to configure your working machine to properly authenticate to your libops site is by running this command:

```
cd /path/to/libops/sites
Expand All @@ -38,15 +38,15 @@ sitectl drush uli

`sitectl set developer` does three things:

1. Adds the Google Cloud account you're authenticated as with the `gcloud` command to your libops.yml `developer` mapping. This is what authenticates you when running LibOps CLI commands against your site
1. Adds the Google Cloud account you're authenticated as with the `gcloud` command to your libops.yml `developer` mapping. This is what authenticates you when running libops CLI commands against your site
2. Adds your current public IP address to the HTTPS and SSH firewalls. The default value can be overriden with the `--ip` flag
3. Adds your public SSH key to libops.yml so you can SFTP to your environment

## Authentication Overview

### Google Cloud authentication

The LibOps CLI makes calls to the `gcloud` CLI for requests to LibOps services that require JWT authentication. In order to properly authenticate, you must configure your LibOps site to allow requests from your Google Cloud account. This configuration is done by adding your Google Cloud email address to the [libops.yml](./yml.md) `developers` mapping.
The libops CLI makes calls to the `gcloud` CLI for requests to libops services that require JWT authentication. In order to properly authenticate, you must configure your libops site to allow requests from your Google Cloud account. This configuration is done by adding your Google Cloud email address to the [libops.yml](./yml.md) `developers` mapping.

You can add your currently authenticated gcloud email by simply running the command

Expand All @@ -62,7 +62,7 @@ sitectl set developer --google-account [email protected]

### Firewall Settings

Until your site goes live, all your LibOps environments are behind a firewall so only you and your team can access the sites.
Until your site goes live, all your libops environments are behind a firewall so only you and your team can access the sites.

Ensure the public IPv4 address of the machine(s) you're working from is in the `ssh-firewall` and `https-firewall` lists in [libops.yml](./yml.md). If the IP address you're visiting the site is not configured in libops.yml, you will not be able to access your site.

Expand Down Expand Up @@ -90,25 +90,25 @@ sitectl set developer --pub-key ~/.ssh/id_rsa.pub

## GitHub Access

Currently GitHub access to your GitHub repository can only be managed from [the LibOps website](https://www.libops.io).
Currently GitHub access to your GitHub repository can only be managed from [the libops website](https://www.libops.io).

From there, you can add yourself and other GitHub users to your site by editing your site and adding their GitHub usernames.

![Demonstration of adding GitHub user to site](../assets/img/github.gif)

## Environments

By default, your LibOps site has a development and production environment.
By default, your libops site has a development and production environment.

You can make code changes in development, then deploy them to production once they're ready by creating a GitHub release.

If you have several features you're developing at any given time, you may want to have separate branches off of development to do so. Each branch you create off of the development branch automatically creates its own new environment.

GitHub branches equate to individual environments on LibOps. The exception to this is your production environment. Production code is pushed using GitHub releases/tags.
GitHub branches equate to individual environments on libops. The exception to this is your production environment. Production code is pushed using GitHub releases/tags.

### Cold starts

For LibOps sites that are not on a paid plan, both the development and production environments will power off after a period of no activity. This can cause the initial page load to take anywhere up to 60 seconds to load while the environment comes online. After coming online, your site will be responsive as you'd expect.
For libops sites that are not on a paid plan, both the development and production environments will power off after a period of no activity. This can cause the initial page load to take anywhere up to 60 seconds to load while the environment comes online. After coming online, your site will be responsive as you'd expect.

Paid plans will **never** have cold starts for the production environment.

Expand Down Expand Up @@ -142,22 +142,22 @@ Any commit pushed to GitHub will automatically deploy to the respective environm

![Demonstration of viewing deployment status in GitHub](../assets/img/check-deployment.gif)

While only using git to make code changes is certainly supported, often it's quicker and easier to use SFTP to iterate on a new feature in a LibOps environment. To do so, you will want to configure your IDE.
While only using git to make code changes is certainly supported, often it's quicker and easier to use SFTP to iterate on a new feature in a libops environment. To do so, you will want to configure your IDE.

### Configure your IDE for SFTP

To help you quickly iterate on new features for your site, you can use an SFTP plugin in your IDE to automatically upload code changes from your local machine to any non-production LibOps environment.
To help you quickly iterate on new features for your site, you can use an SFTP plugin in your IDE to automatically upload code changes from your local machine to any non-production libops environment.

First, you'll need to configure you local machine to connect to your environment. The `libops` CLI has an easy utility to configure your `~/.ssh/config` for LibOps. To do so, you can run the command
First, you'll need to configure you local machine to connect to your environment. The `libops` CLI has an easy utility to configure your `~/.ssh/config` for libops. To do so, you can run the command

```
cd path/to/your/libops/site
sitectl config-ssh -e development
```

This will populate your `~/.ssh/config` so any SSH client can establish a connection to your LibOps development environment at the hostname `development.YOUR-LIBOPS-ID.site`.
This will populate your `~/.ssh/config` so any SSH client can establish a connection to your libops development environment at the hostname `development.YOUR-LIBOPS-ID.site`.

An example SFTP config for VSCode for your development environment is already configured in your site's GitHub repository. If you're using VSCode, and followed the instructions above, you should now be able to make edits on your LibOps development environment. Other SFTP Plugins can be configured similarly. The values needed to connect are
An example SFTP config for VSCode for your development environment is already configured in your site's GitHub repository. If you're using VSCode, and followed the instructions above, you should now be able to make edits on your libops development environment. Other SFTP Plugins can be configured similarly. The values needed to connect are

```
user: coder
Expand Down
8 changes: 4 additions & 4 deletions docs/development/metrics.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LibOps Metrics
# libops Metrics

Your LibOps site services emits metrics that are aggregated and displayed on your LibOps Metrics dashboard. You can find the link to you dashboard at [https://www.libops.io/user](https://www.libops.io/user)
Your libops site services emits metrics that are aggregated and displayed on your libops Metrics dashboard. You can find the link to you dashboard at [https://www.libops.io/user](https://www.libops.io/user)

## Timing metrics

Expand All @@ -18,12 +18,12 @@ The dashboard contains a filtered log view of any PHP errors that might be occur

## Container metrics

All of the services running on your LibOps envionrment have CPU, memory, i/o, and network metrics emitted. These metrics can be viewed as an aggregate of all environments and all containers
All of the services running on your libops envionrment have CPU, memory, i/o, and network metrics emitted. These metrics can be viewed as an aggregate of all environments and all containers

![Container metrics](../assets/img/metrics/container-metrics.gif)

### Filter container metrics

You also can filter which container metrics to view by selecting `cluster` to filter by a given LibOps environment and/or selectioning `name` to filter by a given service
You also can filter which container metrics to view by selecting `cluster` to filter by a given libops environment and/or selectioning `name` to filter by a given service

![Filter metrics](../assets/img/metrics/container-metrics-filters.gif)
14 changes: 7 additions & 7 deletions docs/development/yml.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Better documentation coming soon. For now, here is an example structure of your LibOps YAML.
Better documentation coming soon. For now, here is an example structure of your libops YAML.

A file names `libops.yml` will exist in your GitHub repository. You will be able to edit the YAML file to configure different aspects of your LibOps environments.
A file names `libops.yml` will exist in your GitHub repository. You will be able to edit the YAML file to configure different aspects of your libops environments.

```
version: 0.1
Expand All @@ -9,7 +9,7 @@ version: 0.1
# And the MAJOR.MINOR release only
php: 8.2
# The CIDR notation for every source IP that can access your LibOps non-production environments over HTTPS
# The CIDR notation for every source IP that can access your libops non-production environments over HTTPS
# Should be restricted to just IPs for your organization.
# Both IPv4 and IPv6 addresses are supported.
# Network mask (e.g. /24) must be greater than or equal to 16 for IPv4 and 120 for IPv6
Expand All @@ -19,15 +19,15 @@ https-firewall:
- 192.168.100.0/24
- 192.168.200.0/24
# The CIDR notation for every source IP that can SFTP into your LibOps non-production environments
# The CIDR notation for every source IP that can SFTP into your libops non-production environments
# Should be restricted to just IPs for your organization. Ideally, just for machines that need access.
# Only IPv4 are supported for establishing SSH connections to your LibOps environment
# Only IPv4 are supported for establishing SSH connections to your libops environment
ssh-firewall:
# private IPs are just examples. Can be replaced (along with this comment)
- 127.0.12.1/32
- 192.168.100.1/32
# The CIDR notation for every IP Address that can not access any of your LibOps environments, including production
# The CIDR notation for every IP Address that can not access any of your libops environments, including production
# This can be used to block malicious actors
# Both IPv4 and IPv6 addresses are supported.
# Network mask (e.g. /24) must be greater than or equal to 16 for IPv4 and 120 for IPv6
Expand All @@ -36,7 +36,7 @@ blocked-ips:
- 127.0.123.123/32
- 192.168.255.100/32
# Google Cloud users that can make configuration changes to your LibOps environments (more than likely all developers on your site)
# Google Cloud users that can make configuration changes to your libops environments (more than likely all developers on your site)
# Their IP addresses should be included in ssh-firewall and https-firewall
# joe and sarah are just examples - they can be replaced (along with this comment when they are replaced)
developers:
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Welcome to LibOps Documentation
# Welcome to libops Documentation

## Accessing your LibOps Site
## Accessing your libops Site

How to create a site and access your site can be found in [the site docs](site/index.md).

## Developer documentation

How to programatically interact with your LibOps environment can be found in [the developer docs](development/index.md).
How to programatically interact with your libops environment can be found in [the developer docs](development/index.md).
Loading

0 comments on commit 02ddc2c

Please sign in to comment.