Add CloudFormation Template, more about page content, and SEO tags
This commit is contained in:
parent
d53774d89e
commit
ab58b1dbeb
2 changed files with 227 additions and 0 deletions
12
dist/index.html
vendored
12
dist/index.html
vendored
|
@ -6,6 +6,8 @@
|
|||
<title>Visual Subnet Calculator</title>
|
||||
<link rel="stylesheet" href="bootstrap.min.css">
|
||||
<link href="main.css" rel="stylesheet">
|
||||
<meta name="description" content="Quickly design and collaborate on network design. Visual Subnet Calculator focuses on expediting the work of network administrators, not academic subnetting math.">
|
||||
<meta name="robots" content="index, follow" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-xxl mt-3">
|
||||
|
@ -87,6 +89,16 @@
|
|||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Visual Subnet Calculator strives to be a tool for quickly designing networks and collaborating on that design with others. It focuses on expediting the work of network administrators, not academic subnetting math.<br />
|
||||
<br/>
|
||||
<h4>Design Tenants</h4>
|
||||
<ul>
|
||||
<li><span style="font-weight:bold">Simplicity is king.</span> Network admins are busy and Visual Subnet Calculator should always be easy for FIRST TIME USERS to quickly and intuitively use.</li>
|
||||
<li><span style="font-weight:bold">Subnetting is design work.</span> Promote features that enhance visual clarity and easy mental processing of even the mostcomplex architectures.</li>
|
||||
<li><span style="font-weight:bold">Users control the data.</span> We store nothing, but provide convenient ways for users to save and share their designs.</li>
|
||||
<li><span style="font-weight:bold">Embrace community contributions.</span> Consider and respond to all feedback and pull requests in the context of these tenants.</li>
|
||||
</ul>
|
||||
<h4 class="mt-4">Credits</h4>
|
||||
Developed by <a href="https://www.caesarkabalan.com/" target="_blank">Caesar Kabalan</a> with help from <a href="https://github.com/ckabalan/visualsubnetcalc/graphs/contributors" target="_blank">GitHub Contributors</a>!<br/>
|
||||
<br/>
|
||||
Special thanks to <a href="https://www.davidc.net/" target="_blank">davidc</a> for the <a href="https://www.davidc.net/sites/default/subnets/subnets.html" target="_blank">original tool</a> this website is inspired by.<br/>
|
||||
|
|
215
src/cloudformation.yaml
Normal file
215
src/cloudformation.yaml
Normal file
|
@ -0,0 +1,215 @@
|
|||
---
|
||||
AWSTemplateFormatVersion: '2010-09-09'
|
||||
Description: Visual Subnet Calculator
|
||||
Metadata:
|
||||
AWS::CloudFormation::Interface:
|
||||
ParameterGroups:
|
||||
- Label:
|
||||
default: Naming
|
||||
Parameters:
|
||||
- DomainName
|
||||
ParameterLabels:
|
||||
DomainName:
|
||||
default: Domain Name
|
||||
Parameters:
|
||||
DomainName:
|
||||
Type: String
|
||||
Default: ''
|
||||
Description: Domain Name for Route53 Hosted Zone and Static S3 Site
|
||||
Resources:
|
||||
OriginAccessIdentity:
|
||||
Type: AWS::CloudFront::CloudFrontOriginAccessIdentity
|
||||
Properties:
|
||||
CloudFrontOriginAccessIdentityConfig:
|
||||
Comment: Visual Subnet Calculator Static Website Amazon CloudFront Identity
|
||||
StaticWebsite:
|
||||
Type: AWS::S3::Bucket
|
||||
Properties:
|
||||
BucketName: !Sub
|
||||
- visualsubnetcalc-static-website-${Unique}
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
AccessControl: Private
|
||||
LoggingConfiguration:
|
||||
DestinationBucketName: !Ref LoggingBucket
|
||||
LogFilePrefix: s3-static-website/
|
||||
PublicAccessBlockConfiguration:
|
||||
BlockPublicAcls: true
|
||||
BlockPublicPolicy: true
|
||||
IgnorePublicAcls: true
|
||||
RestrictPublicBuckets: true
|
||||
BucketEncryption:
|
||||
ServerSideEncryptionConfiguration:
|
||||
- ServerSideEncryptionByDefault:
|
||||
SSEAlgorithm: AES256
|
||||
VersioningConfiguration:
|
||||
Status: Enabled
|
||||
LifecycleConfiguration:
|
||||
Rules:
|
||||
- Id: DeleteOldVersionAfter7Days
|
||||
Status: Enabled
|
||||
NoncurrentVersionExpiration:
|
||||
NoncurrentDays: 7
|
||||
StaticWebsiteBucketPolicy:
|
||||
Type: AWS::S3::BucketPolicy
|
||||
Properties:
|
||||
Bucket: !Sub
|
||||
- visualsubnetcalc-static-website-${Unique}
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
PolicyDocument:
|
||||
Version: '2012-10-17'
|
||||
Id: WebAccess
|
||||
Statement:
|
||||
- Sid: CloudFrontReadForGetBucketObjects
|
||||
Principal:
|
||||
AWS: !Sub 'arn:${AWS::Partition}:iam::cloudfront:user/CloudFront Origin Access Identity ${OriginAccessIdentity}'
|
||||
Effect: Allow
|
||||
Action:
|
||||
- s3:GetObject
|
||||
- s3:GetObjectVersion
|
||||
Resource: !Sub
|
||||
- arn:${AWS::Partition}:s3:::visualsubnetcalc-static-website-${Unique}/*
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
- Sid: DenyPlaintextAccess
|
||||
Principal: '*'
|
||||
Effect: Deny
|
||||
Action: s3:*
|
||||
Resource:
|
||||
- !Sub
|
||||
- arn:${AWS::Partition}:s3:::visualsubnetcalc-static-website-${Unique}
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
- !Sub
|
||||
- arn:${AWS::Partition}:s3:::visualsubnetcalc-static-website-${Unique}/*
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
Condition:
|
||||
Bool:
|
||||
aws:SecureTransport: 'false'
|
||||
LoggingBucket:
|
||||
Type: AWS::S3::Bucket
|
||||
DeletionPolicy: Retain
|
||||
Properties:
|
||||
BucketName: !Sub
|
||||
- visualsubnetcalc-logging-${Unique}
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
AccessControl: Private
|
||||
PublicAccessBlockConfiguration:
|
||||
BlockPublicAcls: true
|
||||
BlockPublicPolicy: true
|
||||
IgnorePublicAcls: true
|
||||
RestrictPublicBuckets: true
|
||||
OwnershipControls:
|
||||
Rules:
|
||||
- ObjectOwnership: BucketOwnerPreferred
|
||||
BucketEncryption:
|
||||
ServerSideEncryptionConfiguration:
|
||||
- ServerSideEncryptionByDefault:
|
||||
SSEAlgorithm: AES256
|
||||
VersioningConfiguration:
|
||||
Status: Enabled
|
||||
LifecycleConfiguration:
|
||||
Rules:
|
||||
- Id: DeleteOldVersionAfter7Days
|
||||
Status: Enabled
|
||||
NoncurrentVersionExpiration:
|
||||
NoncurrentDays: 7
|
||||
LoggingBucketBucketPolicy:
|
||||
Type: AWS::S3::BucketPolicy
|
||||
DependsOn: LoggingBucket
|
||||
Properties:
|
||||
Bucket: !Sub
|
||||
- visualsubnetcalc-logging-${Unique}
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
PolicyDocument:
|
||||
Version: '2012-10-17'
|
||||
Id: WebAccess
|
||||
Statement:
|
||||
- Sid: S3ServerAccessLogsPolicy
|
||||
Effect: Allow
|
||||
Principal:
|
||||
Service: logging.s3.amazonaws.com
|
||||
Action:
|
||||
- s3:PutObject
|
||||
Resource: !Sub
|
||||
- arn:${AWS::Partition}:s3:::visualsubnetcalc-logging-${Unique}/*
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
Condition:
|
||||
ArnEquals:
|
||||
aws:SourceArn:
|
||||
- !Sub
|
||||
- arn:${AWS::Partition}:s3:::visualsubnetcalc-static-website-${Unique}
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
StringEquals:
|
||||
aws:SourceAccount: !Ref 'AWS::AccountId'
|
||||
- Sid: DenyPlaintextAccess
|
||||
Principal: '*'
|
||||
Effect: Deny
|
||||
Action: s3:*
|
||||
Resource:
|
||||
- !Sub
|
||||
- arn:${AWS::Partition}:s3:::visualsubnetcalc-logging-${Unique}
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
- !Sub
|
||||
- arn:${AWS::Partition}:s3:::visualsubnetcalc-logging-${Unique}/*
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
Condition:
|
||||
Bool:
|
||||
aws:SecureTransport: 'false'
|
||||
HostedZone:
|
||||
Type: AWS::Route53::HostedZone
|
||||
Properties:
|
||||
HostedZoneConfig:
|
||||
Comment: !Sub 'VisualSubnetCalc'
|
||||
Name: !Ref 'DomainName'
|
||||
Certificate:
|
||||
Type: AWS::CertificateManager::Certificate
|
||||
Properties:
|
||||
DomainName: !Ref 'DomainName'
|
||||
DomainValidationOptions:
|
||||
- DomainName: !Ref 'DomainName'
|
||||
HostedZoneId: !Ref 'HostedZone'
|
||||
ValidationMethod: DNS
|
||||
Tags:
|
||||
- Key: Name
|
||||
Value: !Sub 'VisualSubnetCalc'
|
||||
CloudFrontAlias:
|
||||
Type: AWS::Route53::RecordSet
|
||||
Properties:
|
||||
AliasTarget:
|
||||
DNSName: !GetAtt 'CloudFront.DomainName'
|
||||
HostedZoneId: Z2FDTNDATAQYW2
|
||||
Comment: To CloudFront S3
|
||||
HostedZoneId: !Ref 'HostedZone'
|
||||
Name: !Sub '${DomainName}.'
|
||||
Type: A
|
||||
CloudFront:
|
||||
Type: AWS::CloudFront::Distribution
|
||||
Properties:
|
||||
DistributionConfig:
|
||||
Comment: Visual Subnet Calculator Static Website
|
||||
Aliases:
|
||||
- !Ref 'DomainName'
|
||||
Logging:
|
||||
Bucket: !GetAtt LoggingBucket.DomainName
|
||||
Prefix: cloudfront
|
||||
IncludeCookies: true
|
||||
DefaultCacheBehavior:
|
||||
ForwardedValues:
|
||||
QueryString: false
|
||||
TargetOriginId: !Sub 'S3-Static-Website'
|
||||
ViewerProtocolPolicy: redirect-to-https
|
||||
Compress: true
|
||||
DefaultRootObject: index.html
|
||||
Enabled: true
|
||||
HttpVersion: http2
|
||||
Origins:
|
||||
- DomainName: !Sub
|
||||
- visualsubnetcalc-static-website-${Unique}.s3.${AWS::Region}.amazonaws.com
|
||||
- Unique: !Select [ 4, !Split [ '-', !Select [ 2, !Split [ '/', !Ref 'AWS::StackId' ] ] ] ]
|
||||
Id: !Sub 'S3-Static-Website'
|
||||
S3OriginConfig:
|
||||
OriginAccessIdentity: !Sub 'origin-access-identity/cloudfront/${OriginAccessIdentity}'
|
||||
PriceClass: PriceClass_100
|
||||
IPV6Enabled: false
|
||||
ViewerCertificate:
|
||||
AcmCertificateArn: !Ref 'Certificate'
|
||||
MinimumProtocolVersion: TLSv1.2_2021
|
||||
SslSupportMethod: sni-only
|
Loading…
Reference in a new issue