Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 162 lines (106 sloc) 5.815 kb
d0d9b5b @evanmiller Prep for 0.8.0
evanmiller authored
1 Upgrade: From 0.7 to 0.8
2 ------------------------
3
4 Calls to boss_db:find/3-6 need to be replaced with the new boss_db:find/3 API.
5 The third argument should a proplist with options for 'limit', 'offset',
6 'order_by', and 'descending'.
7
8 The 'sort_by' option to the -has BossRecord attribute has been renamed
9 'order_by'.
10
11
1684ff9 Prep for 0.7.2
Evan Miller authored
12 Upgrade: From anything to 0.7.2
13 -------------------------------
14
15 Custom tags should be moved from view/lib/ to view/lib/tag_html.
16
17
5e1f4a1 @jgordor Updated instructions (readme and readme_upgrade)
jgordor authored
18 Upgrade: From 0.6 to 0.7
19 ------------------------
20
21 In Chicago Boss 0.7, projects are now rebarified, boss.config is the central place for all configuration and eunit testing has been made easy,
22
23 bc. ./rebar boss # (list of available commands)
24 ./init.sh # (list of available boot commands)
25
26 h3. Migrate current cb apps
27
28 In order to ease the task, a new make task has been created in the framework Makefile, just update your Chicago Boss and run:
29
30 bc. make rebarize APPDIR=/path/to/app
31
32 This will copy all new files in your app directory, move the app.src file to src, move the boss_web_tests (functionals) to src/test/functional and point you with instructions on what you need add to your boss.config.
33
34 bc. make rebarize APPDIR=../my_app
35 ../my_app rebar-boss-ified
36 WARNING: your boss.config have not been changed, you need to set:
37 - in boss app section:
38 ---- {path, "/path/to/chicago_boss"}
39 ---- {vm_cookie, "my_secret_cookie"} % Optional, defaults to abc123
40 - for each app defined:
41 ---- {path, "../path/to/app"}
42 INFO: you can safely remove the Makefile and start* files from your app dir
43 INFO: after the boss.config change, you can run:
44 cd ../my_app
45 ./rebar boss # Shows all boss-rebar commands
46 ./init.sh # Shows the new boot system commands
47
48 h3. Compilation
49
50 Boss has non-standard-compatible-rebar-way of compiling code, the rebar plugin switches off standard compilation and calls the boss_load module.
51
52 ./rebar compile (works for compatibility mode)
53 ./rebar boss c=compile
54
55 h3. Configuration
56
57 Now the only file on a cb project you need to take care is boss.config, the new init.sh calls ./rebar boss commands that returns automatically generated erl -pa... commands and executes it.
58
59 You now defines the path in boss.config for each app and (compilation, test launch, start, stop, reload, ...) works automatically.
60
61 A new setting in boss.config called vm_cookie (optional) has been added, used in start/stop/reload commands (defaults to "abc123"):
62
63 bc. [{boss, [ {path, "../ChicagoBoss"}, {vm_cookie, "abc123"}, ...
64
65 h3. Tests
66
67 Eunit testing compilation/setup works automatically, start writing unit tests, just place them in "src/test/eunit" and run ./rebar eunit or ./rebar boss c=test_eunit
68
69 Functional tests lives now in src/test/functional (before was placed in src/test), just call ./rebar boss c=test_functional
70
71 h3. Init
72
73 The init.sh handles start, start-dev as before, but also stop, reload (hot for the node) and restart is implemented.
74
75 Now we can tweak, change, make vm.args configurable (in boss.config) without force developers to handle this manually in their apps.
76
a571b28 Major refactoring to support multiple apps
Evan Miller authored
77 Upgrade: From 0.5 to 0.6
78 ------------------------
79
80 Starting with Chicago Boss 0.6, projects follow an OTP layout, and the admin
81 interface is a standalone OTP application.
82
83 To upgrade, you will need to do the following in your project:
84
85 mkdir src
86 mkdir priv
87 mv controller/ init/ lib/ mail/ model/ test/ view/ src/
88 mv lang/ static/ priv/
89 PROJECT=my_application mv boss.routes priv/$PROJECT.routes
90
91 In addition, you will need to prefix your controller modules with the application
92 name. E.g.
93
94 mv blog_controller.erl my_application_blog_controller.erl
95
96 This avoids module naming conflicts when multiple applications are installed on
97 the same server (which was not possible prior to 0.6).
98
99
100 Upgrade: From 0.5.x to 0.5.y
101 ----------------------------
74bd246 @evanmiller Update README for new build system
evanmiller authored
102
103 Starting with Chicago Boss 0.5, the framework source is kept separate from your
104 project source. After downloading and building a new copy of CB, you need to update
105 your server scripts to point to the new source. Open "start-dev.sh" and "start.sh"
106 and make sure there is an argument like this:
107
108 -pa /path/to/new/ChicagoBoss/ebin
109
110 You might also want to update your /admin interface by copying the "skel/admin"
111 directory from the new CB over to your project directory.
112
113
114 Upgrade: From 0.4 to 0.5
115 ------------------------
116
117 The easiest way to upgrade from 0.4 is to create a new CB app and copy your source
118 into it. In the CB source directory, type:
119
120 make
121 make app PROJECT=mynewproject
122 cd ../mynewproject
123 cp -a /path/to/existing/project/view \
124 /path/to/existing/project/model \
125 /path/to/existing/project/controller \
126 /path/to/existing/project/static \
127 /path/to/existing/project/boss.config \
128 .
129
130 Then start the server with ./start-dev.sh
131
132
6a13346 @evanmiller Update docs
evanmiller authored
133 Upgrade: From 0.4.x to 0.4.y
134 ----------------------------
135
136 Starting with Chicago Boss 0.4, application upgrades are as simple as:
137
138 cp -a /path/to/old/ChicagoBoss/[a-z]* .
139
140 In general, files in the project directory that start with an upper-case letter
141 belong to Boss. Files which start with a lower-case letter belong to you.
142
143
23ec0d4 @evanmiller File restructuring and much more
evanmiller authored
144 Upgrade: From 0.3 to 0.4
145 ------------------------
146
147 The directory structure has changed somewhat. The MVC files have moved around, and
148 files for the /admin interface are in a separate directory (ADMIN).
149
150 The following steps should get you most of the way to an upgrade:
151
152 cp -a /path/to/old/ChicagoBoss/boss.config .
153 cp -a /path/to/old/ChicagoBoss/Web/*_controller.erl controller/
154 rm controller/admin_controller.erl
155 cp -a /path/to/old/ChicagoBoss/Web/*.erl lib/
156 cp -a /path/to/old/ChicagoBoss/Model/* model/
157 cp -a /path/to/old/ChicagoBoss/Web/*_views view/
158 rm -r view/admin_views
159 cp -a /path/to/old/ChicagoBoss/static/* static/
160 make clean
161 make
Something went wrong with that request. Please try again.