dotnet / nuget-trends

Check out NuGet packages adoption and what's trending on NuGet.
https://nugettrends.com
MIT License
150 stars 28 forks source link

Use tye for dev and deployment #107

Open bruno-garcia opened 4 years ago

bruno-garcia commented 4 years ago

Currently there's a set of script/docker-compose files to deploy things in production. A separate docker-compose file in the repo for development.

The .NET project tye (early days) would be ideal to replace this.

bruno-garcia commented 4 years ago

Early experiment went as far as publishing packages to docker hub but failed when creating dns names since the package names have . in them:

12:19 $ tye deploy --interactive
Loading Application Details...
Enter the Container Registry (ex: 'example.azurecr.io' for Azure or 'example' for dockerhub): nugt
Processing Service 'nugettrends.api'...
    Applying container defaults...
    Compiling Services...
    Publishing Project...
    Building Docker Image...
        Created Docker Image: 'nugt/nugettrends.api:1.0.0-52209c87fbf5b362c4c0073ae7ed56626596f2f2'
    Pushing Docker Image...
        Pushed docker image: 'nugt/nugettrends.api:1.0.0-52209c87fbf5b362c4c0073ae7ed56626596f2f2'
    Validating Secrets...
    Generating Manifests...
Processing Service 'nugettrends.scheduler'...
    Applying container defaults...
    Compiling Services...
    Publishing Project...
    Building Docker Image...
        Created Docker Image: 'nugt/nugettrends.scheduler:1.0.0-52209c87fbf5b362c4c0073ae7ed56626596f2f2'
    Pushing Docker Image...
        Pushed docker image: 'nugt/nugettrends.scheduler:1.0.0-52209c87fbf5b362c4c0073ae7ed56626596f2f2'
    Validating Secrets...
    Generating Manifests...
Deploying Application Manifests...

        Writing output to '/var/folders/_7/wwdx9_fs62ngsdjd6528pq580000gn/T/tmpAqQyF2.tmp'.
            Error from server (Invalid): error when creating "/var/folders/_7/wwdx9_fs62ngsdjd6528pq580000gn/T/tmpAqQyF2.tmp": Deployment.apps "nugettrends.api" is invalid: spec.template.spec.containers[0].name: Invalid value: "nugettrends.api": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
            Error from server (Invalid): error when creating "/var/folders/_7/wwdx9_fs62ngsdjd6528pq580000gn/T/tmpAqQyF2.tmp": Service "nugettrends.api" is invalid: metadata.name: Invalid value: "nugettrends.api": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')
            Error from server (Invalid): error when creating "/var/folders/_7/wwdx9_fs62ngsdjd6528pq580000gn/T/tmpAqQyF2.tmp": Deployment.apps "nugettrends.scheduler" is invalid: spec.template.spec.containers[0].name: Invalid value: "nugettrends.scheduler": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
            Error from server (Invalid): error when creating "/var/folders/_7/wwdx9_fs62ngsdjd6528pq580000gn/T/tmpAqQyF2.tmp": Service "nugettrends.scheduler" is invalid: metadata.name: Invalid value: "nugettrends.scheduler": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')
Drats! 'deploy' failed:
    'kubectl apply' failed.

The issue is known (dotnet/tye#411).