2012-11-15 13:02:38 +00:00
|
|
|
[[!meta title="How to update cdist"]]
|
|
|
|
|
|
|
|
## Update The Git Installation
|
2012-11-15 11:00:25 +00:00
|
|
|
|
|
|
|
To upgrade cdist in the current branch use
|
|
|
|
|
|
|
|
git pull
|
|
|
|
|
|
|
|
# Also update the manpages
|
|
|
|
./build man
|
|
|
|
export MANPATH=$MANPATH:$(pwd -P)/doc/man
|
|
|
|
|
|
|
|
If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break.
|
|
|
|
The master branch on the other hand is the development branch and may not be
|
|
|
|
working, break your setup or eat the tree in your garden.
|
|
|
|
|
2013-07-16 15:11:24 +00:00
|
|
|
### Safely upgrading to new versions
|
|
|
|
|
|
|
|
To upgrade to **any** further cdist version, you can take the
|
|
|
|
following procedure to do a safe upgrade:
|
|
|
|
|
|
|
|
# Create new branch to try out the update
|
|
|
|
git checkout -b upgrade_cdist
|
|
|
|
|
|
|
|
# Get latest cdist version in git database
|
|
|
|
git fetch -v
|
|
|
|
|
|
|
|
# see what will happen on merge - replace
|
|
|
|
# master with the branch you plan to merge
|
|
|
|
git diff upgrade_cdist..origin/master
|
|
|
|
|
|
|
|
# Merge the new version
|
|
|
|
git merge origin/master
|
|
|
|
|
|
|
|
Now you can ensure all custom types work with the new version.
|
|
|
|
Assume that you need to go back to an older version during
|
|
|
|
the migration/update, you can do so as follows:
|
|
|
|
|
|
|
|
# commit changes
|
|
|
|
git commit -m ...
|
|
|
|
|
|
|
|
# go back to original branch
|
|
|
|
git checkout master
|
|
|
|
|
|
|
|
After that, you can go back and continue the upgrade:
|
|
|
|
|
|
|
|
# git checkout upgrade_cdist
|
|
|
|
|
|
|
|
|
2012-11-15 13:02:38 +00:00
|
|
|
## Update The Python Package
|
|
|
|
|
|
|
|
To upgrade to the lastet version do
|
|
|
|
|
|
|
|
pip install --upgrade cdist
|
|
|
|
|
2013-07-16 15:32:24 +00:00
|
|
|
## General Update Instructions
|
2012-11-15 13:02:38 +00:00
|
|
|
|
2014-03-19 18:00:39 +00:00
|
|
|
### Updating from 3.0 to 3.1
|
|
|
|
|
|
|
|
The type **\_\_ssh_authorized_keys** now also manages existing keys,
|
|
|
|
not only the ones added by cdist.
|
|
|
|
|
2013-12-24 22:25:54 +00:00
|
|
|
### Updating from 2.3 to 3.0
|
|
|
|
|
|
|
|
The **changed** attribute of objects has been removed.
|
2013-12-24 22:30:33 +00:00
|
|
|
Use [messaging](/software/cdist/man/3.0.0/man7/cdist-messaging.html) instead.
|
2013-12-24 22:25:54 +00:00
|
|
|
|
2013-08-12 10:42:26 +00:00
|
|
|
### Updating from 2.2 to 2.3
|
|
|
|
|
|
|
|
No incompatiblities.
|
|
|
|
|
2013-07-12 17:40:31 +00:00
|
|
|
### Updating from 2.1 to 2.2
|
|
|
|
|
|
|
|
Starting with 2.2, the syntax for requiring a singleton type changed:
|
|
|
|
Old format:
|
|
|
|
|
|
|
|
require="__singleton_type/singleton" ...
|
|
|
|
|
|
|
|
New format:
|
|
|
|
|
|
|
|
require="__singleton_type" ...
|
|
|
|
|
|
|
|
Internally the "singleton" object id was dropped to make life more easy.
|
|
|
|
You can probably fix your configuration by running the following code
|
|
|
|
snippet (currently untested, please report back if it works for you):
|
|
|
|
|
|
|
|
find ~/.cdist/* -type f -exec sed -i 's,/singleton,,' {} \;
|
|
|
|
|
2012-11-15 13:02:38 +00:00
|
|
|
### Updating from 2.0 to 2.1
|
|
|
|
|
2012-12-08 22:15:03 +00:00
|
|
|
Have a look at the update guide for [[2.0 to 2.1|2.0-to-2.1]].
|
2012-12-08 22:08:01 +00:00
|
|
|
|
2012-11-15 13:33:08 +00:00
|
|
|
* Type **\_\_package* and \_\_process** use --state **present** or **absent**.
|
2012-11-15 13:02:38 +00:00
|
|
|
The states **removed/installed** and **stopped/running** have been removed.
|
|
|
|
Support for the new states is already present in 2.0.
|
2012-11-15 13:33:08 +00:00
|
|
|
* Type **\_\_directory**: Parameter --parents and --recursive are now boolean
|
|
|
|
The old "yes/no" values need to be removed.
|
|
|
|
* Type **\_\_rvm_ruby**: Parameter --default is now boolean
|
|
|
|
The old "yes/no" values need to be removed.
|
2012-11-15 16:48:01 +00:00
|
|
|
* Type **\_\_rvm_gemset**: Parameter --default is now boolean
|
|
|
|
The old "yes/no" values need to be removed.
|
2012-11-15 13:33:08 +00:00
|
|
|
* Type **\_\_addifnosuchline** and **\_\_removeline** have been replaced by **\_\_line**
|
2012-11-15 13:02:38 +00:00
|
|
|
* The **conf** directory is now located at **cdist/conf**.
|
|
|
|
You need to migrate your types, explorers and manifests
|
|
|
|
manually to the new location.
|
2012-11-15 13:33:08 +00:00
|
|
|
* Replace the variable **\_\_self** by **\_\_object_name**
|
|
|
|
Support for the variable **\_\_object_name** is already present in 2.0.
|
|
|
|
* The types **\_\_autofs**, **\_\_autofs_map** and **\_\_autofs_reload** have been removed
|
2012-11-15 13:08:27 +00:00
|
|
|
(no maintainer, no users)
|
2012-11-18 22:31:19 +00:00
|
|
|
* Type **\_\_user**: Parameter --groups removed (use the new \_\_user_groups type)
|
2012-11-30 13:51:15 +00:00
|
|
|
* Type **\_\_ssh_authorized_key** has been replaced by more flexible type
|
|
|
|
**\_\_ssh_authorized_keys**
|
2012-11-15 13:02:38 +00:00
|
|
|
|
|
|
|
### Updating from 1.7 to 2.0
|
2012-11-15 11:00:25 +00:00
|
|
|
|
2012-11-15 13:02:38 +00:00
|
|
|
* Ensure python (>= 3.2) is installed on the source host
|
2012-11-15 11:00:25 +00:00
|
|
|
* Use "cdist config host" instead of "cdist-deploy-to host"
|
|
|
|
* Use "cdist config -p host1 host2" instead of "cdist-mass-deploy"
|
|
|
|
* Use "cdist banner" for fun
|
2012-11-15 13:06:25 +00:00
|
|
|
* Use **\_\_object_name** instead of **\_\_self** in manifests
|
2012-11-15 11:00:25 +00:00
|
|
|
|
2012-11-15 13:02:38 +00:00
|
|
|
### Updating from 1.6 to 1.7
|
2012-11-15 11:00:25 +00:00
|
|
|
|
|
|
|
* If you used the global explorer **hardware_type**, you need to change
|
|
|
|
your code to use **machine** instead.
|
|
|
|
|
2012-11-15 13:02:38 +00:00
|
|
|
### Updating from 1.5 to 1.6
|
2012-11-15 11:00:25 +00:00
|
|
|
|
|
|
|
* If you used **\_\_package_apt --preseed**, you need to use the new
|
|
|
|
type **\_\_debconf_set_selections** instead.
|
|
|
|
* The **\_\_package** types accepted either --state deinstalled or
|
|
|
|
--state uninstaaled. Starting with 1.6, it was made consistently
|
|
|
|
to --state removed.
|
|
|
|
|
2012-11-15 13:02:38 +00:00
|
|
|
### Updating from 1.3 to 1.5
|
2012-11-15 11:00:25 +00:00
|
|
|
|
|
|
|
No incompatiblities.
|
|
|
|
|
2012-11-15 13:02:38 +00:00
|
|
|
### Updating from 1.2 to 1.3
|
2012-11-15 11:00:25 +00:00
|
|
|
|
|
|
|
Rename **gencode** of every type to **gencode-remote**.
|
|
|
|
|
2012-11-15 13:02:38 +00:00
|
|
|
### Updating from 1.1 to 1.2
|
2012-11-15 11:00:25 +00:00
|
|
|
|
|
|
|
No incompatiblities.
|
|
|
|
|
2012-11-15 13:02:38 +00:00
|
|
|
### Updating from 1.0 to 1.1
|
2012-11-15 11:00:25 +00:00
|
|
|
|
|
|
|
In 1.1 the type **\_\_file** was split into **\_\_directory**, **\_\_file** and
|
|
|
|
**\_\_link**. The parameter **--type** was removed from **\_\_file**. Thus you
|
|
|
|
need to replace **\_\_file** calls in your manifests:
|
|
|
|
|
|
|
|
* Remove --type from all \_\_file calls
|
|
|
|
* If type was symlink, use \_\_link and --type symbolic
|
|
|
|
* If type was directory, use \_\_directory
|
|
|
|
|
|
|
|
|
|
|
|
[[!tag cdist unix]]
|