teracyhq-incubator / teracy-dev-v05-compat Goto Github PK
View Code? Open in Web Editor NEWteracy-dev-v05-compat extension
License: MIT License
teracy-dev-v05-compat extension
License: MIT License
they have been released
it's ready to be shipped
it's ready to be shipped
From @hoatle on November 22, 2018 9:2
From @hoatle on July 6, 2017 12:15
sometimes it crashed and stopped syncing.
We should auto restart it in this case.
Thinking if we should run it in the background?
Copied from original issue: teracyhq/dev#337
Copied from original issue: teracyhq-incubator/teracy-dev-essential#29
it's ready to be shipped
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
it's ready to be shipped
because teracy-dev-essential v0.3.0 handles all of the stuff, we need to check if v0.3.0 is used, do not register the RsyncRecovery in this extension.
to keep up with the new features, improvements, and bug fixes
$ vagrant provision --provision-with teracy-dev-v05-compat
should call the chef provision of this extension
# 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.
need to add CI check with Github Actions
it's ready to be shipped
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.
so that users can upgrade/migrate easily from teracy-dev v0.5 to teracy-dev v0.6 by:
and it should be done
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
follow best practices for naming _id
# 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
This is a great example for backward compatibility support
Given:
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
$ vagrant reload --provision
one more timecurrent: 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.