Code Monkey home page Code Monkey logo

nubesgen's Introduction

NubesGen

REST Server - Continuous Integration CLI - Continuous Integration

Going to production on Azure is only one git push away

โ” What is NubesGen?

๐ŸŽ‰ Online instance available at https://nubesgen.com/

๐Ÿ“– Full documentation

Detailed documentation

Are you ready to get started with NubesGen? Our full documentation is available at here.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

nubesgen's People

Contributors

aaronpowell avatar agoncal avatar agriffard avatar bnasslahsen avatar cedricvidal avatar cmaneu avatar davidsntg avatar dependabot[bot] avatar edburns avatar ernani avatar felipmiguel avatar iemejia avatar imod avatar ioan-surariu avatar jdubois avatar jsoref avatar ksatirli avatar layzeedk avatar pamelafox avatar sinedied avatar timyates avatar trask avatar wizzwise avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nubesgen's Issues

NubesGen generated project not working on Mac ARM64

Overview of the issue

NubesGen generated projects do not work on new Macs because the aztfmod/azurecaf provider does not support yet ARM64

Motivation for or Use Case
Reproduce the error

Generate a nubesgen project from the web UI and try to run terraform init on a Mac M1

 % terraform init
Initializing modules...

Initializing the backend...

Initializing provider plugins...
- Finding hashicorp/azurerm versions matching ">= 2.75.0"...
- Finding aztfmod/azurecaf versions matching "1.2.8"...
- Installing hashicorp/azurerm v2.86.0...
- Installed hashicorp/azurerm v2.86.0 (signed by HashiCorp)
โ•ท
โ”‚ Error: Incompatible provider version
โ”‚
โ”‚ Provider registry.terraform.io/aztfmod/azurecaf v1.2.6 does not have a package available for your current platform, darwin_arm64.
โ”‚
โ”‚ Provider releases are separate from Terraform CLI releases, so not all providers are available for all platforms. Other versions of this provider may have different platforms supported.
Related issues
Suggest a Fix

We need to generate the terraform scripts with a higher version of the provider, I tried to do this but found that even if the azurecaf project supports already arm64 on version 1.2.8 we need to wait until they publish the ARM64 azurecaf provider binaries to fix it. aztfmod/terraform-provider-azurecaf#126

NubesGen Version(s)
Browsers and Operating System

Mac M1
macOS Monterrey 12.0.1

Add support for Bicep

Work for this feature is happening in features/bicep branch.

TODO

How to contribute

  1. Add a comment with the todo item you want to work on
  2. Fork the repository, create a new branch and start adding bicep template files
  3. Test locally (or in GitHub Codespaces) that your code works :)
  4. Create a pull request to features/bicep and add me as a reviewer

Tags: nubes version tag

Overview of the issue

For version upgrades, we'll need to understand from which Nubes version a resource has been deployed.

Motivation for or Use Case
Suggest a Fix

Add by default a "nubes-version" tag with the current version number as value

App Service - Allow easy environment variable addition

Overview of the issue

We should be able to easily add environment variables without modifying extensively the terraform templates (at least the modules).

Suggest a Fix

See #84 and the map(string) construct. We should also document how to do that with GitHub Actions / Secrets.

NubesGen Version(s)

0.0.1

Improve TF State Storage account

We use an Azure Storage account to store the Terraform state. This storage account is created by the shell script.

We should provide a way to manage this with Terraform instead. We can take inspiration from CAF Landing zone, where if I'm not mistaken, this is done:

  • Apply a basic terraform template, with state in local, containing the storage account
  • Push the TF state to the storage account

Implementation details

  • To do this, we need a "fork" in our CI/CI script and/or documentation.
  • How we do this in a smart way? Querying the rg to see if the resource group is present? Using a secret (can a github action change a secret value? Querying the "remote TF state" (can we do that?)

Migrate foundation from Spring MVC to Spring WebFlux

Overview of the issue

Convert underpinnings of NubesGen to take advantage of reactive streams publishers/subscribers using Project Reactor/Spring WebFlux types/constructs.

Motivation for or Use Case

Goals are to increase flexibility and scalability, while providing an excellent representative migration from blocking to non-blocking API within an outward-facing production application.

Adhere to Microsoft OpenSource rules

Related to #6

Files to include

  • A Readme.md
  • A LICENSE.txt
  • Code of conduct
  • Telemetry notice
  • Trademark notice
  • Security Reporting Instructions
  • A CONTRIBUTING.md

Public Launch

  • Articles:
    • Dev.to
    • MS TechCommunity
  • Announcement video
  • Announcement event?

Support Pull request workflow

Related to epic #19

When using NubesGen-generated GH Action, the following should happen when we're creating a pull request:

If we modified TF files

  • Detect the target environment
  • Run a Terraform Plan
  • Output the result in the PR?

If we modified code files

  • Run the build stage

Logging is not enabled for this container

Overview of the issue

I am trying to adapt NubesGen to deploy a Quarkus application. It doesn't work and I can't see the logs to diagnose what's wrong. I have installed Application Insights, can stream the logs, but no logs about the application.

Reproduce the error

I'm using NubesGen 0.1.1 with Application Insights and GitHub actions. When I push my code, everything works fine and the application gets deployed at https://app-demo-5412-0427-6050-1036-devq-001.azurewebsites.net. Good. But when I click on the link, I get:

:( Application Error
If you are the application administrator, you can access the diagnostic resources.

When I click on the link to diagnose the app, I get Web App Down and when I browse the logs I see:

INFO  - Starting container for site
INFO  - docker run -d -p 4732:80 --name app-demo-5412-0427-6050-1036-devq-001_0_2e3ff278 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=app-demo-5412-0427-6050-1036-devq-001 -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=app-demo-5412-0427-6050-1036-devq-001.azurewebsites.net -e WEBSITE_INSTANCE_ID=ff658300eddad1c3f077dd4a34ab735ddc289731a761d2fed0aed11557821f2c mcr.microsoft.com/azure-app-service/java:11-java11_200714234736

INFO  - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.

INFO  - Initiating warmup request to container app-demo-5412-0427-6050-1036-devq-001_0_2e3ff278 for site app-demo-5412-0427-6050-1036-devq-001
ERROR - Container app-demo-5412-0427-6050-1036-devq-001_0_2e3ff278 for site app-demo-5412-0427-6050-1036-devq-001 has exited, failing site start2021-06-03T11:21:39.914Z ERROR - Container app-demo-5412-0427-6050-1036-devq-001_0_2e3ff278 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.
INFO  - Stopping site app-demo-5412-0427-6050-1036-devq-001 because it failed during startup.

And when I visit the https://aka.ms/linux-diagnostics page it tells me to check logs streams which tells me that logs are not enabled.

Any idea on how I can see the logs of my app ?

NubesGen Version(s)

0.1.1

Browsers and Operating System

MacOSX + Chrome

Feature: Prettier Java for formatting Java code

Overview of the issue

I'm suggesting to add prettier-java https://github.com/jhipster/prettier-java for formatting all Java code.
What do you think ?

cc @jdubois as you know well this project :-)

Motivation for or Use Case

Consistency in existing code

Reproduce the error
Related issues
Suggest a Fix
  • add prettier-java in package.json dependencies
  • add pre commit hook
  • format all existing Java code
NubesGen Version(s)

current main

Browsers and Operating System

Add support for Azure Spring Cloud

Support for Azure Spring Cloud using Terraform:

  • Terraform configuration to create the cluster + the application
    • Support for databases
    • Support for Redis
    • Support for Key Vault
    • Support for App Insights
  • Update the frontend to be able to select the Azure Spring Cloud logo
  • GitHub Action to deploy the application automatically using GitOps

Create documentation website

Overview of the issue

As any OpenSource project, we need to have a great documentation. We already have some docs here.

Motivation for or Use Case

We would like to have a proper documentation website. Exact content is TBD (ideas welcome!) but here are some ideas we had:

  • Porting over the existing docs
  • Having better getting started documentations
  • Have a FAQ for "next steps" (eg.: I've deployed my website, how do I add a custom domain now?)
  • Use docs as a "poor MVP" (eg: we're wondering if Azure DevOps builds should be supported. Add a documentation page for this, and measure with Clarity if we have any traction to that doc page)
  • Have a "Contributing" space for better instructions for contributors.
What to build?

I was thinking about a VuePress website, stored under /docs folder, and hosted in GitHub pages, but this is not mandatory!. Happy to have a conversation about it :)

After discussions and @stevengonsalvez PR
We'll build that V2 of the documentation with docsify.

  • Import @stevengonsalvez work on docs-v2 branch
  • Revamp design & logos
  • Add appropriate plugins
  • Create basic Documentation structure (What is NubesGen? Getting started, Core concepts, Cookbooks, Contributing)

Support for Virtual Machines

With @jdubois, we have for a few months some thinking about supporting Virtual Machines/IaaS deployments within NubesGen. However, even if we have a lot of ideas, we don't really know what product to build.

Before building anything, we would need some "customer research" to understand how NubesGen can be appealing to people who explicitly don't want to deploy to PaaS services, but are only targeting VMs.
This issue is here to track this search effort.

Good First Issue
We're open to have first-time contributors on this topic :). As long as you have tried NubesGen and "got the spirit" (we're here to answer your questions ;)), there is no need to code, write infra as code or know any internals of NubesGen to help us converge to a product vision ๐Ÿ˜ƒ

Add support for deploying a Quarkus application in JVM mode

Overview of the issue

Be able to deploy a Quarkus application with NubesGen.

Motivation for or Use Case

A Quarkus application can be deployed in several ways: Docker, JVM, Native. For now let's just concentrate on the JVM mode (deploying an Uber JAR).

Related issues

See discussion: #115

NubesGen Version(s)

0.1.1

Browsers and Operating System

MacOSX and Chrome

Improve terraform state storage account name

After few usages, I ended up having several storage accounts "for nothing" (I already deleted like 4 of them before this screenshot). And it was very difficult to tie-them back to their project.

image

I think we should improve the automatic naming we're doing here.

Output the resource group name

Overview of the issue

Resource groups are important in Azure as you can mange resources (app, db). It would be nice to display the name of the group once Terraform has applied its templates. At the moment, only the application_hostname is displayed:

module.application.azurerm_app_service.application: Creation complete after 42s [id=/subscriptions/938928af-1e32-4226-b619-fd898a1cd7da/resourceGroups/rg-demo-2882-0286-9283-1371-dev-001/providers/Microsoft.Web/sites/app-demo-2882-0286-9283-1371-dev-001]

Apply complete! Resources: 7 added, 0 changed, 0 destroyed.

Outputs:

application_hostname = "https://app-demo-2882-0286-9283-1371-dev-001.azurewebsites.net"

It would be nice to have the resource group name as well:

Outputs:

application_hostname = "https://app-demo-2882-0286-9283-1371-dev-001.azurewebsites.net"
resource_group = "rg-demo-2882-0286-9283-1371-dev-001"
Motivation for or Use Case

Even if the resource group name can be easily found in the logs, it would be nice to have it directly in the output so then we can use az group commands (eg. az group show --resource-group rg-demo-2882-0286-9283-1371-dev-001).

Suggest a Fix

In the outputs.tf we should have something like that (the following works, but I'm not totally sure of the syntax as I don't know much about Terraform)

output "resource_group" {
    value       = local.resource_group
    description = "The resource group."
}
NubesGen Version(s)

NubesGen v0.1.0

Browsers and Operating System

MacOSX and Chrome

Public Launch

  • Articles:
    • Dev.to
    • MS TechCommunity
  • Announcement video
  • Announcement event?

Deploying functions fails with globally unique isn't available for Node.js

Overview of the issue

Error: The name "func-demo-dev-001" used for the Function App needs to be globally unique and isn't available: Hostname 'func-demo-dev-001' already exists. Please select a different name.

on modules/function/main.tf line 41, in resource "azurerm_function_app" "application":
41: resource "azurerm_function_app" "application" ***

Add a default runtime when none is selected

Overview of the issue

Today, NubesGen has a set of runtimes (eg. Spring) and the idea is to have new ones (eg. Quarkus, Micronaut). To make it easy to add new runtimes, the Mustache templates should rely on a default runtime when none is specified.

Motivation for or Use Case

See discussion: #115 (comment)

The way the Mustache templates are structured makes it difficult to add a new runtime. For example, take the src/main/resources/nubesgen/terraform/modules/app-service/main.tf.mustache template. If the runtime is Spring, then we have a SPRING_DATASOURCE_URL property, if not, we have a DATABASE_URL:

{{#runtimeSpring}}
    "SPRING_PROFILES_ACTIVE"     = "prod,azure"
    
  {{#databaseTypeSqlServer}}
    "SPRING_DATASOURCE_URL"      = "jdbc:sqlserver://${var.database_url}"
  {{/databaseTypeSqlServer}}
  ...
{{/runtimeSpring}}
{{^runtimeSpring}}
  {{#databaseTypeSqlServer}}
    "DATABASE_URL"      = var.database_url
  {{/databaseTypeSqlServer}}
  ...
{{/runtimeSpring}}

If we keep the same structure and add a new runtime, then we have duplicates. In the following template, if we add a Quarkus runtime, then, we have a QUARKUS_DATASOURCE_JDBC_URL property.... but because it's not a Spring runtime, the default DATABASE_URL property is also added

{{#runtimeQuarkus}}
    "QUARKUS_HTTP_PORT"           = 80
    "QUARKUS_PROFILE"             = "prod"
    
  {{#databaseTypeSqlServer}}
    "QUARKUS_DATASOURCE_JDBC_URL" = "jdbc:sqlserver://${var.database_url}"
  {{/databaseTypeSqlServer}}
  ...
{{#runtimeQuarkus}}
{{#runtimeSpring}}
    "SPRING_PROFILES_ACTIVE"     = "prod,azure"
    
  {{#databaseTypeSqlServer}}
    "SPRING_DATASOURCE_URL"      = "jdbc:sqlserver://${var.database_url}"
  {{/databaseTypeSqlServer}}
  ...
{{/runtimeSpring}}
{{^runtimeSpring}}
  {{#databaseTypeSqlServer}}
    "DATABASE_URL"      = var.database_url
  {{/databaseTypeSqlServer}}
  ...
{{/runtimeSpring}}

Mustache does not allow to have several inverted section. So it would be better to have a default runtime if none is specified. We could have something like:

{{#runtimeQuarkus}}
  ...
{{#runtimeQuarkus}}
{{#runtimeSpring}}
  ...
{{/runtimeSpring}}
{{#runtimeMicronaut}}
  ...
{{/runtimeMicronaut}}
{{#runtimeDefault}}
  ...
{{/runtimeDefault}}
NubesGen Version(s)

0.1.1

Browsers and Operating System

MacOSX and Chrome

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.