cdk-valheim
Project description
cdk-valheim
A high level CDK construct of Valheim dedicated server.
Features
- Fargate cluster to run a Valheim server, with EFS for persistence (schedulable)
- Hourly AWS Backup with 3 days retention (customizable)
- lloesche/valheim-server as the default container image (replaceable)
See integration test for an example.
API Doc
See API.md
References
- On-demand, serverless Valheim server setup with AWS CDK, Discord Interactions and GitLab CI
- Grantapher/discord-cdk-valheim
Examples
The construct is published to both npm and PyPI.
TypeScript
new ValheimWorld(stack, 'ValheimWorld', {
cpu: 2048,
memoryLimitMiB: 4096,
schedules: [{
start: { hour: '12', weekDay: '1-5' },
stop: { hour: '1', weekDay: '1-5' },
}],
environment: {
SERVER_NAME: 'CDK Valheim',
WORLD_NAME: 'Amazon',
SERVER_PASS: 'fargate',
BACKUPS: 'false',
},
});
Python
ValheimWorld(
self,
'ValheimWorld',
cpu=2048,
memory_limit_mib=4096,
schedules=[ValheimWorldScalingSchedule(
start=CronOptions(hour='12', week_day='1-5'),
stop=CronOptions(hour='1', week_day='1-5'),
)],
environment={
'SERVER_NAME': 'CDK Valheim',
'WORLD_NAME': 'Amazon',
'SERVER_PASS': 'fargate',
'BACKUPS': 'false',
})
Testing
- Unit test and snapshot test
npx projen test
- Integration test
npx cdk -a "npx ts-node src/integ.valheim.ts" diff
npx cdk -a "npx ts-node src/integ.valheim.ts" deploy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cdk-valheim-0.0.26.tar.gz
(388.8 kB
view details)
Built Distribution
cdk_valheim-0.0.26-py3-none-any.whl
(387.0 kB
view details)
File details
Details for the file cdk-valheim-0.0.26.tar.gz
.
File metadata
- Download URL: cdk-valheim-0.0.26.tar.gz
- Upload date:
- Size: 388.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98955d54456fa3c691713c707c7ee6127c3a9503bd70fa8a26286c8e078b7dc8 |
|
MD5 | 5f79118399c8a2ebeabe4f87a724d237 |
|
BLAKE2b-256 | 0a49313b4b51aac1fda459a16ebef2566c5e92f3c495b76e9eb8d9993cca7468 |
File details
Details for the file cdk_valheim-0.0.26-py3-none-any.whl
.
File metadata
- Download URL: cdk_valheim-0.0.26-py3-none-any.whl
- Upload date:
- Size: 387.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d016e1252565ca37b9cafa0fca0a4897a2636199fca8cc7bb126e13bc346c15 |
|
MD5 | 92a6115f477cb149930f8c4d0d574272 |
|
BLAKE2b-256 | 4fcec6e754e4f70b7833d0461d6268d52f7255e30b4dcc86f60adc6ff4f5ce26 |