-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
53 lines (35 loc) · 1.74 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
This is a collection of Git Hooks to version control the F5 iRules and
Datagroups with git, and update the F5 device as soon the new version is pushed
to a git repository
= Dependencies =
You need to install the bigsuds python library from DevCentral F5 Website
= System architecture =
This is the architecture: You have 3 hosts:
|DevPC| <--- git+ssh ---> |GitBareRepository| <--- iControl SOAP API ---> |BIG-IP LTM|
You work on your PC and you make changes to the iRules
When you push your commits to the GitBareRepository the pre-receive hook is triggered,
and the changes are pushed to the BIGIP devices.
= Limitations =
This code assumes the following
A git "bare" repository manages files only for 1 partition
On DevPC you can have different branches for different F5 partitions
A git repository manages either irules or datagroups
All files are in the main folder without subfolders.
Of course you can modify the scripts to avoid these limitations, pull requests
are welcome.
= Getting started =
You probably have some irules already running on your BIGIP,
you can backup them to files using the backup-tool. Once you have the files
you can create a new git repository and commit the first version of your irules
files.
== iRules git branch per F5 Single Partition ==
Create the git bare repository:
cd /opt/irules-git/
git init --bare --shared=group mypartitionname
chgrp -Rv mygroupname mypartitionname
cd mypartitionname/hooks
wget https://raw.githubusercontent.com/zioproto/f5-git-hooks/master/irules-singlepartition/pre-receive
chmod +x pre-receive
vim pre-receive #change user password ip address and gbranch name (that is name of gitbranch and partition)
on your laptop:
git remote add myremote ssh://user@ipaddress:/opt/irules-git/mypartitionname