Code Monkey home page Code Monkey logo

unboundedsystems / adapt Goto Github PK

View Code? Open in Web Editor NEW
405.0 6.0 13.0 13.15 MB

ReactJS for your infrastructure. Create and deploy full-stack apps to any infrastructure using the power of React.

Home Page: https://adaptjs.org

License: Apache License 2.0

Makefile 0.64% Shell 1.27% JavaScript 2.57% Batchfile 0.01% TypeScript 95.39% HTML 0.07% CSS 0.04% Dockerfile 0.02%
infrastructure-as-code devops javascript typescript react reactjs containers k8s kubernetes aws

adapt's People

Contributors

dependabot[bot] avatar mterrel avatar mvachhar avatar renovate-bot avatar tdyas 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

adapt's Issues

Initial make build gives git permission error cloning adapt-web

When cloning adapt and building for a first time developer user, make build fails, giving a permission error when trying to clone the adapt-web repo. The error is simliar to this:

git clone [email protected]:unboundedsystems/adapt-web.git web
Cloning into 'web'...
Warning: Permanently added the ECDSA host key for IP address '172.65.251.78' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
/src/config/build_support/web.mk:30: recipe for target 'web/.git' failed
make: *** [web/.git] Error 128
make: *** [/home/tdyas/Projects/Adapt/adapt/config/build_support/dockerize.mk:36: .DOCKER_MAKE_DONE] Error 2

Workaround

Clone the adapt-web repo manually before doing make build. From the adapt repo root:

git clone [email protected]:unboundedsystems/adapt-web.git web

Then, a subsequent make build should work correctly.

User-created DomError component present in the DOM tree

CURRENT BEHAVIOUR:

I'm having troubles running the Hello world example for Adapt, I keep getting an error when running:

adapt run --deployID movieapp

The full error log in the console is this:

adapt run --deployID movieapp       
Adapt by Unbounded Systems [CLI v0.1.0]

  ✔ Installing node modules
  ✔ Validating project
  ❯ Creating new project deployment
    ✔ Compiling project
    ✖ Building new DOM
      → Error building Adapt project
      Loading previous DOM
      Observing environment
      Deploying

8 warnings encountered during deploy:
[DOM build] : User-created DomError component present in the DOM tree
[DOM build] : Component Container cannot be built with current props: Component construction failed: Unable to find constructor with correct name. Outer constructor is: cloud.Container
[DOM build] : User-created DomError component present in the DOM tree
[DOM build] : Component Container cannot be built with current props: Component construction failed: Unable to find constructor with correct name. Outer constructor is: cloud.Container
[DOM build] : User-created DomError component present in the DOM tree
[DOM build] : Component Container cannot be built with current props: Component construction failed: Unable to find constructor with correct name. Outer constructor is: cloud.Container
[DOM build] : User-created DomError component present in the DOM tree
[DOM build] : Component Container cannot be built with current props: Component construction failed: Unable to find constructor with correct name. Outer constructor is: cloud.Container

 ›   Error: This project cannot be deployed.
 ›   1 error encountered during deploy:
 ›   [deploy:run] : Error creating deployment: Error building Adapt project
 ›
 ›   Deployment not created due to errors

EXPECTED BEHAVIOUR:

Example project builds and runs successfully

PROJECT:

https://github.com/barucAlmaguer/adapt-hello-world

Feature request: render HTML for visualization

This is really cool approach for infrastructure as code.

I often use visualization tools like CloudCraft or diagrams for initial prototyping, but once it deployed using another tool like terraform, it is difficult to keep them in sync.

Since this project shares the core concept of React, I think this can "render" it by just adding a render target and the same representation can be visualized via HTML, SVG, etc.

EBUSY error with 'adapt run' on Windows

When attempting to follow the instructions in the GKE blog article, the adapt run step results in the error Error: EBUSY: resource busy or locked, rmdir, like in the following output:

$ adapt run k8s-test --deployID app-test
[13:23:59] Installing node modules [started]
[13:24:02] Installing node modules [failed]
[13:24:02] → EBUSY: resource busy or locked, rmdir 'E:\Sites\wud\deploy'
Error: EBUSY: resource busy or locked, rmdir 'E:\Sites\wud\deploy'
Code: EBUSY

Adapt version: v0.3.1
Node version: 12.18.3
Windows 10
GNU bash, version 4.4.23(1)-release (x86_64-pc-msys) (MinGW) - Note that this error also occurs when run under PowerShell.

Thanks to @kirkbross for originally reporting this issue.

Error executing Adapt project: Could not resolve JS module 'moment'

Newly created Adapt projects (ones that don't have a yarn.lock file already) are failing with the following error:

$ adapt run --deployID moviedb
  ✔ Installing node modules
  ✔ Validating project
  ❯ Creating new project deployment
    ✖ Compiling project
      → Error executing Adapt project: Could not resolve JS module 'moment' sta…
      Building new DOM
      Loading previous DOM
      Observing environment
      Deploying
 ›   Error: This project cannot be deployed.
 ›   1 error encountered during deploy:
 ›   [deploy:run] : Error creating deployment: Error executing Adapt project: 
 ›   Could not resolve JS module 'moment' starting at 
 ›   '/tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server'. Looked in: 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment/package.json, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment/index.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment/index.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment/p
 ›   ackage.json, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment.j
 ›   s, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment.j
 ›   sx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment/i
 ›   ndex.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment/i
 ›   ndex.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment/packa
 ›   ge.json, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment/index
 ›   .js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment/index
 ›   .jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment/package.js
 ›   on, /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment/index.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment/index.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment/package.json, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment/index.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment/index.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js/index.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js/index.jsx, 
 ›   /tmp/moviedb/node_modules/moment/package.json, 
 ›   /tmp/moviedb/node_modules/moment.js, /tmp/moviedb/node_modules/moment.jsx, 
 ›   /tmp/moviedb/node_modules/moment/index.js, 
 ›   /tmp/moviedb/node_modules/moment/index.jsx, 
 ›   /tmp/node_modules/moment/package.json, /tmp/node_modules/moment.js, 
 ›   /tmp/node_modules/moment.jsx, /tmp/node_modules/moment/index.js, 
 ›   /tmp/node_modules/moment/index.jsx, /node_modules/moment/package.json, 
 ›   /node_modules/moment.js, /node_modules/moment.jsx, 
 ›   /node_modules/moment/index.js, /node_modules/moment/index.jsx:
 ›   Error: Could not resolve JS module 'moment' starting at 
 ›   '/tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server'. Looked in: 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment/package.json, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment/index.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/node_modules/m
 ›   oment/index.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment/p
 ›   ackage.json, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment.j
 ›   s, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment.j
 ›   sx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment/i
 ›   ndex.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/node_modules/moment/i
 ›   ndex.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment/packa
 ›   ge.json, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment/index
 ›   .js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/dist/node_modules/moment/index
 ›   .jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment/package.js
 ›   on, /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment/index.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/core/node_modules/moment/index.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment/package.json, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment/index.js, 
 ›   /tmp/moviedb/deploy/node_modules/@adpt/node_modules/moment/index.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.jsx, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js/index.js, 
 ›   /tmp/moviedb/deploy/node_modules/moment/ts3.1-typings/moment.js/index.jsx, 
 ›   /tmp/moviedb/node_modules/moment/package.json, 
 ›   /tmp/moviedb/node_modules/moment.js, /tmp/moviedb/node_modules/moment.jsx, 
 ›   /tmp/moviedb/node_modules/moment/index.js, 
 ›   /tmp/moviedb/node_modules/moment/index.jsx, 
 ›   /tmp/node_modules/moment/package.json, /tmp/node_modules/moment.js, 
 ›   /tmp/node_modules/moment.jsx, /tmp/node_modules/moment/index.js, 
 ›   /tmp/node_modules/moment/index.jsx, /node_modules/moment/package.json, 
 ›   /node_modules/moment.js, /node_modules/moment.jsx, 
 ›   /node_modules/moment/index.js, /node_modules/moment/index.jsx
 ›        at resolveJSModule 
 ›   (/tmp/moviedb/deploy/node_modules/typescript/lib/typescript.js:27608:19)
 ›        at Object.<anonymous> 
 ›   (/tmp/moviedb/deploy/node_modules/@adpt/core/dist/src/server/local_history
 ›   .js:21:42)

 ›   Deployment not created due to errors

This appears to be an issue with an update to moment.js, between 2.24.0 and 2.25.3. A workaround appears to be pinning the version of moment.js by manually editing the package.json file for your Adapt project with the following:

...
  "resolutions": {
    "moment": "2.24.0"
}
...

[DOM build] : Component Container cannot be built with current props: Component construction failed

Trying to run the movieapp hello world and I run into this error.

deploy% adapt version
@adpt/cli/0.2.0-next.3 darwin-x64 node-v13.8.0
deploy% adapt run --deployID movieapp
Adapt by Unbounded Systems [CLI v0.2.0-next.3]

  ✔ Installing node modules
  ✔ Validating project
  ❯ Creating new project deployment
    ✔ Compiling project
    ✖ Building new DOM
      → Error building Adapt project
      Loading previous DOM
      Observing environment
      Deploying

8 warnings encountered during deploy:
[DOM build] : User-created DomError component present in the DOM tree
[DOM build] : Component Container cannot be built with current props: Component construction failed: Unable to find constructor with correct name. Outer constructor is: cloud.Container
[DOM build] : User-created DomError component present in the DOM tree
[DOM build] : Component Container cannot be built with current props: Component construction failed: Unable to find constructor with correct name. Outer constructor is: cloud.Container
[DOM build] : User-created DomError component present in the DOM tree
[DOM build] : Component Container cannot be built with current props: Component construction failed: Unable to find constructor with correct name. Outer constructor is: cloud.Container
[DOM build] : User-created DomError component present in the DOM tree
[DOM build] : Component Container cannot be built with current props: Component construction failed: Unable to find constructor with correct name. Outer constructor is: cloud.Container

 ›   Error: This project cannot be deployed.
 ›   1 error encountered during deploy:
 ›   [deploy:run] : Error creating deployment: Error building
 ›   Adapt project
 ›
 ›   Deployment not created due to errors

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.