Giter Site home page Giter Site logo

teracy-dev-v05-compat's People

Contributors

actions-user avatar datphan avatar hieptranquoc avatar hoatle avatar phuonglm avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

teracy-dev-v05-compat's Issues

failed to sync created files from Linux host due to inotify bug

From @hoatle on November 22, 2018 9:1

From @hoatle on June 20, 2017 3:59

egor.k [2:05 AM] 
@hoatle hello again
There is a bug I think, when I create a migration file (I usually duplicate the last one) and then modify it, it doesn't synchronize with virtual machine.
Like this:
1. copy the last migration (with a new folder name of course) - sync works
2. make changes in a new migration's `up.sql` file - sync doesn't work anymore for this file

`vagrant reload` helps, but maybe there is a known way to force all files sync manually or something like this, that doesn't involve rebuild?
I don't create migrations often so it's no very important (edited)

hoatle [7:32 AM] 
thank you @egor.k, sync should work, @phuong please help checking on this

phuong [8:52 AM] 
ok

after triaging, @phuonglm found out that it was a inotify bug and @phuonglm will continue to handle this.

Hopefully this can be fixed by v0.5.0-c1

Copied from original issue: teracyhq/dev#330

Copied from original issue: teracyhq-incubator/teracy-dev-essential#28

should have bash-completion support (at least on Ubuntu)

# temporary solution for https://github.com/teracyhq/dev/issues/388
# install bash-completion if not yet available
if platform?('ubuntu')
  bash 'check exist and install bash-completion' do
    code <<-EOH
      apt-get install bash-completion
      . /etc/bash_completion
      EOH
    not_if { ::File.exist?('/etc/bash_completion') && ::File.exist?('/usr/share/bash-completion/bash_completion') }
  end
end

Support Ubuntu for now, will add more support later.

should upgrade to use the recent latest version of chef_solo

so that we can avoid any problem with new cookbooks, get more support

Expected: works well with the latest chef version

Given:
Comment the version setting to use the latest chef_solo version

teracy-dev-v05-compat hoatle$ git diff
diff --git a/config.yaml b/config.yaml
index 26a1a47..d7bf787 100644
--- a/config.yaml
+++ b/config.yaml
@@ -65,7 +65,7 @@ nodes:
       - _id: "v05-compat-chef"
         _id_deprecated: 'v05-compat-0'
         name: teracy-dev-v05-compat
-        version: 13.1.31
+        # version  : 13.1.31
         type: chef_solo
         log_level: info
         enabled: true

When $ vagrant up

Then it should work as normal

Actual: it did not work, error reported:

    teracy-dev.local: Installing Chef (latest)...
==> teracy-dev.local: Generating chef JSON and uploading...
==> teracy-dev.local: Running chef-solo...
==> teracy-dev.local: Chef Infra Client cannot execute without accepting the license
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

should port v0.5 features to this extension

so that users can upgrade/migrate easily from teracy-dev v0.5 to teracy-dev v0.6 by:

  • each user project should create an extension with yaml config migrating from existsing json config
  • using teracy-dev-essential + teracy-dev-v05-compat, user project extensions

and it should be done

should fix chef_solo nodes cache problem

After vagrant up, chef_solo creates a host file under provisioners/chef_solo/nodes with configuration data, however, they're not updated correctly when there is changing configuration.

So the solution is to delete that created file before vagrant up, vagrant reload

should add files support to copy files

# manage files with file resource: using src as path for content source and dest
# path as the saved destination path
#
# see: https://docs.chef.io/resource_file.html
#
# example:
#
# teracy-dev:
#   # copy certs files for nginx proxy
#   files:
#     - _id: teracy-common-cert-key
#       src: /vagrant/workspace/certs/teracy-local-key.pem
#       dest: /etc/nginx/certs/teracy.local.key
#       owner: vagrant
#       group: vagrant
#       mode: '0755'
#       action: create
#     - _id: teracy-common-cert
#       src: /vagrant/workspace/certs/teracy-local.crt
#       dest: /etc/nginx/certs/teracy.local.crt
#       owner: vagrant
#       group: vagrant
#       mode: '0755'
#       action: create

docker-compose was not re-installed when its version config changed

  • Given:

    • use teracy-dev v0.6.0-a8
    • create the workspace/teracy-dev-entry/config_default.yaml file with the following content, notice docker-compose.version: '1.25.3':
    teracy-dev:
    
      extensions:
    
        - _id: "entry-v05-compat"
          path:
            extension: teracy-dev-v05-compat
          location:
            git:
              remote:
                origin: https://github.com/teracyhq-incubator/teracy-dev-v05-compat.git
              branch: develop
          require_version: ">= 0.5.0-SNAPSHOT"
          enabled: true
    
        - _id: "entry-essential"
          path:
            extension: teracy-dev-essential
          location:
            git:
              remote:
                origin: https://github.com/teracyhq-incubator/teracy-dev-essential.git
              branch: v0.7.0
          require_version: ">= 0.7.0"
          enabled: true
    
    
        - _id: "kernel-core"
          location: # auto download the extension into the lookup_path
            git:
              remote:
                origin: https://github.com/teracyhq-incubator/teracy-dev-core.git
              branch: v0.4.0
          require_version: ">= 0.4.0"
          enabled: true
    
    
    nodes:
      - _id: "0"
        provisioners:
          - _id: "v05-compat-chef"
            json:
              docker_compose:
                version: '1.25.3' # more: https://github.com/docker/compose/releases/
  • When $ vagrant up finished

  • Then $ vagrant ssh -c "docker-compose version" should output:

    docker-compose version 1.25.3, build d4d1b42b
  • Given updating the docker-compose.version to 1.25.4

  • When $ vagrant reload --provision finished

  • Then $ vagrant ssh -c "docker-compose version" should output:

    docker-compose version 1.25.4, build xxxxxx
  • But actually:

bash: docker-compose: command not found
  • Workaround solution: $ vagrant reload --provision one more time

directories should be created with recursive by default

current: error when creating directories with recursive

expected: can create directories with recursive by default

workaround: create a directory by directory

example config:

nodes:
  - _id: "0"
    provisioners:
      - _id: 'v05-compat-chef'
        json:
          teracy-dev:
            directories:
              - _id: "iorad-common-certs-dir"
                path: /etc/nginx/certs
                owner: vagrant
                group: vagrant
                mode: '0755'
                action: create
                recursive: true # TODO: support this

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.