Skip to content

Instantly share code, notes, and snippets.

View eulersson's full-sized avatar

Ramon Blanquer eulersson

  • Barcelona
View GitHub Profile
@eulersson
eulersson / nvim-remote-dev.md
Last active April 29, 2024 05:15
Abandoned Neovim Remote Development Workflows

This documents shows all my attempts to develop containers that are supposed to run on a Raspberry Pi in my home network. In the end I decided to simply represent the architecture with Docker Compose and run VS Code Dev Containers:

https://github.com/eulersson/taconez/wiki/4.-Development-Workflow

Discarded Tools for Remote Development

Discarded Alternative 1: lsyncd

# Specifies a resource that Application Auto Scaling can scale. In our case
# it's just the backend.
AutoScalingTarget:
Type: AWS::ApplicationAutoScaling::ScalableTarget
Properties:
MinCapacity: 1
MaxCapacity: 3
ResourceId: !Join ['/', [service, !Ref ECSCluster, !GetAtt BackendService.Name]]
ScalableDimension: ecs:service:DesiredCount
ServiceNamespace: ecs
BackendService:
Type: AWS::ECS::Service
Properties:
ServiceName: ecsfs-backend-service
Cluster: !Ref ECSCluster
LaunchType: FARGATE
DesiredCount: 1
ServiceRegistries: # And that's how you associate ecsfs-backend.local!
- RegistryArn: !GetAtt BackendLocalDiscoveryService.Arn
NetworkConfiguration:
LocalNamespace:
Type: AWS::ServiceDiscovery::PrivateDnsNamespace
Properties:
Vpc: !Ref VPC
Name: local
NginxLocalDiscoveryService:
Type: AWS::ServiceDiscovery::Service
Properties:
Name: ecsfs-nginx
BackendTaskDefinition:
Type: AWS::ECS::TaskDefinition
DependsOn: LogGroup
Properties:
Family: ecsfs-backend-td
Cpu: 256
Memory: 1024
NetworkMode: awsvpc
RequiresCompatibilities:
- FARGATE
ExecutionRole:
Type: AWS::IAM::Role
Properties:
RoleName: ecsfs-execution-role
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service: ecs-tasks.amazonaws.com
Action: sts:AssumeRole
LogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: ecsfs-logs
ECSCluster:
Type: AWS::ECS::Cluster
Properties:
ClusterName: ecsfs-cluster
TargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
Name: ecsfs-target-group
Port: 80
Protocol: HTTP
TargetType: ip
VpcId: !Ref VPC
ListenerHTTP:
FargateContainerSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Access to Fargate containers.
VpcId: !Ref VPC
IngressFromPublicALBSecurityGroup:
Type: AWS::EC2::SecurityGroupIngress
Properties:
Description: Ingress from the public Application Load Balancer.