Skip to content

Commit c42f2ae

Browse files
committed
add publish ai-docs flow to release process
1 parent 798ffb6 commit c42f2ae

File tree

597 files changed

+28534
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

597 files changed

+28534
-34
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ jobs:
192192
env:
193193
STACKTAPE_API_KEY: ${{ secrets.STACKTAPE_API_KEY }}
194194
run: bun run publish:schemas
195+
- name: Publish AI docs
196+
env:
197+
STACKTAPE_API_KEY: ${{ secrets.STACKTAPE_API_KEY }}
198+
run: bun run publish:ai:docs
195199

196200
- name: Update package.json versions
197201
run: |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Overview
2+
3+
A MongoDB Atlas cluster is a schema-less, NoSQL database that is fully managed by MongoDB. Although it is not an AWS-native service, Stacktape seamlessly integrates it into your stacks.
4+
5+
MongoDB Atlas clusters are secure, scalable, and highly available. They have built-in replication and support backups and point-in-time recovery. Each stack that includes a MongoDB Atlas cluster will also create a new [MongoDB Atlas project](https://docs.atlas.mongodb.com/tutorial/manage-projects/), which ensures isolation between stacks.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Advantages
2+
3+
- **Secure:** Your data is protected by multiple layers of security.
4+
- **Scalable:** You can scale your cluster up or down as your needs change.
5+
- **Performant:** MongoDB Atlas is designed for high performance.
6+
- **Backups and point-in-time recovery:** You can restore your data to a previous state in case of an accident.
7+
- **High availability:** Your data is replicated across multiple servers to ensure that it is always available.
8+
- **ACID transactions:** MongoDB supports multi-document ACID transactions.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Disadvantages
2+
3+
- **Separate billing:** Although Stacktape integrates with MongoDB Atlas, you will still need to manage your billing separately.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Provider configuration
2+
3+
To use MongoDB Atlas with Stacktape, you will need to:
4+
5+
1. Create a [MongoDB Atlas account](https://account.mongodb.com/account/register).
6+
2. Follow our [step-by-step guide](../../user-guides/mongo-db-atlas-credentials/.md) to get your `organizationId`, `publicKey`, and `privateKey`.
7+
3. Store your credentials in a [secret](../../security-resources/secrets//index.md).
8+
9+
```yaml
10+
# {start-highlight}
11+
providerConfig:
12+
mongoDbAtlas:
13+
privateKey: 'xxxxfa523543fxxxx42543xx'
14+
publicKey: 'xxxxxxx'
15+
organizationId: 'xxxxxxxxxxx07a593cbe63dd'
16+
# {stop-highlight}
17+
18+
resources:
19+
myMongoCluster:
20+
type: 'mongo-db-atlas-cluster'
21+
properties:
22+
clusterTier: M2
23+
```
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Basic usage
2+
3+
```yaml
4+
# {start-ignore}
5+
providerConfig:
6+
mongoDbAtlas:
7+
privateKey: 'xxxxfa523543fxxxx42543xx'
8+
publicKey: 'xxxxxxx'
9+
organizationId: 'xxxxxxxxxxx07a593cbe63dd'
10+
# {stop-ignore}
11+
resources:
12+
# {start-highlight}
13+
myMongoDbCluster:
14+
type: mongo-db-atlas-cluster
15+
properties:
16+
clusterTier: M2
17+
# {stop-highlight}
18+
myLambda:
19+
type: function
20+
properties:
21+
packaging:
22+
type: stacktape-lambda-buildpack
23+
properties:
24+
entryfilePath: path/to/my/lambda.ts
25+
environment:
26+
- name: MONGODB_CONNECTION_STRING
27+
value: $ResourceParam('myMongoDbCluster', 'connectionString')
28+
connectTo:
29+
- myMongoDbCluster
30+
```
31+
32+
```typescript
33+
import { MongoClient } from 'mongodb';
34+
35+
const client = new MongoClient(process.env.MONGODB_CONNECTION_STRING);
36+
37+
const handler = async (event, context) => {
38+
await client.connect();
39+
40+
const db = client.db('mydb');
41+
42+
await db.collection('posts').insertOne({
43+
title: 'My first post',
44+
content: 'Hello!'
45+
});
46+
47+
const post = await db.collection('posts').findOne({ title: 'My first post' });
48+
49+
await client.close();
50+
};
51+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Cluster tier
2+
3+
The cluster tier determines the resources (memory, storage, IOPS) for each data-bearing node in your cluster. To learn more, see the [MongoDB Atlas documentation](https://docs.atlas.mongodb.com/cluster-tier/).
4+
5+
```yaml
6+
# {start-ignore}
7+
providerConfig:
8+
mongoDbAtlas:
9+
privateKey: 'xxxxfa523543fxxxx42543xx'
10+
publicKey: 'xxxxxxx'
11+
organizationId: 'xxxxxxxxxxx07a593cbe63dd'
12+
# {stop-ignore}
13+
resources:
14+
myMongoCluster:
15+
type: 'mongo-db-atlas-cluster'
16+
properties:
17+
# {start-highlight}
18+
clusterTier: M2
19+
# {stop-highlight}
20+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Disk size
2+
3+
Each cluster tier comes with a default amount of storage. All M10+ clusters automatically scale their storage, but you can disable this behavior. You can also customize the storage capacity for all M10+ clusters.
4+
5+
```yaml
6+
# {start-ignore}
7+
providerConfig:
8+
mongoDbAtlas:
9+
privateKey: 'xxxxfa523543fxxxx42543xx'
10+
publicKey: 'xxxxxxx'
11+
organizationId: 'xxxxxxxxxxx07a593cbe63dd'
12+
# {stop-ignore}
13+
resources:
14+
myMongoCluster:
15+
type: mongo-db-atlas-cluster
16+
properties:
17+
clusterTier: M2
18+
# {start-highlight}
19+
diskSizeGB: 60
20+
# {stop-highlight}
21+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Auto-scaling
2+
3+
```yaml
4+
# {start-ignore}
5+
providerConfig:
6+
mongoDbAtlas:
7+
privateKey: 'xxxxfa523543fxxxx42543xx'
8+
publicKey: 'xxxxxxx'
9+
organizationId: 'xxxxxxxxxxx07a593cbe63dd'
10+
# {stop-ignore}
11+
resources:
12+
myMongoDbCluster:
13+
type: mongo-db-atlas-cluster
14+
properties:
15+
clusterTier: M10
16+
# {start-highlight}
17+
autoScaling:
18+
minClusterTier: M10
19+
maxClusterTier: M30
20+
disableDiskScaling: true
21+
disableScaleDown: true
22+
# {stop-highlight}
23+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Sharding
2+
3+
```yaml
4+
# {start-ignore}
5+
providerConfig:
6+
mongoDbAtlas:
7+
privateKey: 'xxxxfa523543fxxxx42543xx'
8+
publicKey: 'xxxxxxx'
9+
organizationId: 'xxxxxxxxxxx07a593cbe63dd'
10+
# {stop-ignore}
11+
resources:
12+
myMongoCluster:
13+
type: mongo-db-atlas-cluster
14+
properties:
15+
clusterTier: M30
16+
# {start-highlight}
17+
numShards: 3
18+
# {stop-highlight}
19+
```

0 commit comments

Comments
 (0)