Skip to content

Commit 914f360

Browse files
committed
Update Fledge branch
1 parent 11a6488 commit 914f360

File tree

23 files changed

+465
-465
lines changed

23 files changed

+465
-465
lines changed

README.rst

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
.. Links
3-
.. _main repository: https://github.com/foglamp/FogLAMP
3+
.. _main repository: https://github.com/fledge/Fledge
44

55

66
*****************************
7-
Packaging Project for FogLAMP
7+
Packaging Project for Fledge
88
*****************************
99

10-
This repo contains the scripts used to create a FogLAMP package.
10+
This repo contains the scripts used to create a Fledge package.
1111

1212
We have separated the package build from the `main repository`_ in order to provide a more flexible packaging and to maintain the smallest possible footprint of the main project, even in terms of source code and development.
1313

@@ -37,7 +37,7 @@ The make_deb Script
3737
3838
$ ./make_deb help
3939
make_deb [help|clean|cleanall]
40-
This script is used to create the Debian package of FogLAMP
40+
This script is used to create the Debian package of Fledge
4141
Arguments:
4242
help - Display this help text
4343
clean - Remove all the old versions saved in format .XXXX
@@ -58,22 +58,22 @@ The make_deb Script
5858
Building a Debian Package
5959
=========================
6060

61-
First, make sure that FogLAMP is properly installed via ``make install`` somewhere on your environment (default is */usr/local/foglamp*).
61+
First, make sure that Fledge is properly installed via ``make install`` somewhere on your environment (default is */usr/local/fledge*).
6262
Finally, run the ``make_deb`` command and it will make as per ``arch``:
6363

6464
.. code-block:: console
6565
6666
$ ./make_deb
67-
The package root directory is : /home/foglamp/foglamp-pkg
68-
The FogLAMP directory is : /usr/local/foglamp
69-
The FogLAMP version is : 1.6.0
70-
The package will be built in : /home/foglamp/foglamp-pkg/packages/Debian/build/x86_64
67+
The package root directory is : /home/fledge/fledge-pkg
68+
The Fledge directory is : /usr/local/fledge
69+
The Fledge version is : 1.6.0
70+
The package will be built in : /home/fledge/fledge-pkg/packages/Debian/build/x86_64
7171
The architecture is set as : x86_64
72-
The package name is : foglamp-1.6.0-x86_64
72+
The package name is : fledge-1.6.0-x86_64
7373
7474
Populating the package...Done.
7575
Building the new package...
76-
dpkg-deb: building package 'foglamp' in 'foglamp-1.6.0-x86_64.deb'.
76+
dpkg-deb: building package 'fledge' in 'fledge-1.6.0-x86_64.deb'.
7777
Building Complete.
7878
$
7979
@@ -83,35 +83,35 @@ The result will be:
8383
8484
$ ls -l packages/Debian/build/x86_64
8585
total 564
86-
drwxrwxr-x 4 foglamp foglamp 4096 Mar 23 17:35 foglamp-1.6.0-x86_64
87-
-rw-r--r-- 1 foglamp foglamp 572742 Mar 23 17:35 foglamp-1.6.0-x86_64.deb
86+
drwxrwxr-x 4 fledge fledge 4096 Mar 23 17:35 fledge-1.6.0-x86_64
87+
-rw-r--r-- 1 fledge fledge 572742 Mar 23 17:35 fledge-1.6.0-x86_64.deb
8888
$
8989
9090
If you execute the ``make_deb`` command again, you will see:
9191

9292
.. code-block:: console
9393
9494
$ ./make_deb
95-
The package root directory is : /home/foglamp/foglamp-pkg
96-
The FogLAMP directory is : /usr/local/foglamp
97-
The FogLAMP version is : 1.6.0
98-
The package will be built in : /home/foglamp/foglamp-pkg/packages/Debian/build/x86_64
95+
The package root directory is : /home/fledge/fledge-pkg
96+
The Fledge directory is : /usr/local/fledge
97+
The Fledge version is : 1.6.0
98+
The package will be built in : /home/fledge/fledge-pkg/packages/Debian/build/x86_64
9999
The architecture is set as : x86_64
100-
The package name is : foglamp-1.6.0-x86_64
100+
The package name is : fledge-1.6.0-x86_64
101101
102-
Saving the old working environment as foglamp-1.6.0-x86_64.0001
102+
Saving the old working environment as fledge-1.6.0-x86_64.0001
103103
Populating the package...Done.
104-
Saving the old package as foglamp-1.6.0-x86_64.deb.0001
104+
Saving the old package as fledge-1.6.0-x86_64.deb.0001
105105
Building the new package...
106-
dpkg-deb: building package 'foglamp' in 'foglamp-1.6.0-x86_64.deb'.
106+
dpkg-deb: building package 'fledge' in 'fledge-1.6.0-x86_64.deb'.
107107
Building Complete.
108108
$
109109
$ ls -l packages/Debian/build/x86_64
110110
total 1128
111-
drwxrwxr-x 4 foglamp foglamp 4096 Mar 23 17:53 foglamp-1.6.0-x86_64
112-
drwxrwxr-x 4 foglamp foglamp 4096 Mar 23 17:35 foglamp-1.6.0-x86_64.0001
113-
-rw-r--r-- 1 foglamp foglamp 573080 Mar 23 17:54 foglamp-1.6.0-x86_64.deb
114-
-rw-r--r-- 1 foglamp foglamp 572742 Mar 23 17:35 foglamp-1.6.0-x86_64.deb.0001
111+
drwxrwxr-x 4 fledge fledge 4096 Mar 23 17:53 fledge-1.6.0-x86_64
112+
drwxrwxr-x 4 fledge fledge 4096 Mar 23 17:35 fledge-1.6.0-x86_64.0001
113+
-rw-r--r-- 1 fledge fledge 573080 Mar 23 17:54 fledge-1.6.0-x86_64.deb
114+
-rw-r--r-- 1 fledge fledge 572742 Mar 23 17:35 fledge-1.6.0-x86_64.deb.0001
115115
$
116116
117117
... where the previous build is now marked with the suffix *.0001*.
@@ -123,7 +123,7 @@ The make_rpm Script
123123
124124
$ ./make_rpm --help
125125
make_rpm help [clean|cleanall]
126-
This script is used to create the RPM package of FogLAMP
126+
This script is used to create the RPM package of Fledge
127127
Arguments:
128128
help - Display this help text
129129
clean - Remove all the old versions saved in format .XXXX
@@ -133,33 +133,33 @@ The make_rpm Script
133133
Building a RPM Package
134134
======================
135135

136-
First, make sure that FogLAMP is properly installed via ``make install`` somewhere on your environment (default is */usr/local/foglamp*).
136+
First, make sure that Fledge is properly installed via ``make install`` somewhere on your environment (default is */usr/local/fledge*).
137137
Next, *x86* is the only currently supported architecture for RedHat/Centos.
138138
Finally, run the ``make_rpm`` command:
139139

140140
.. code-block:: console
141141
142142
$ ./make_rpm
143-
The package root directory is : /home/foglamp/repos/foglamp-pkg
144-
The FogLAMP directory is : /home/foglamp/foglamp
145-
The FogLAMP version is : 1.5.2
146-
The package will be built in : /home/foglamp/repos/foglamp-pkg/packages/rpmbuild/RPMS/x86_64
147-
The package name is : foglamp-1.5.2-1.x86_64
143+
The package root directory is : /home/fledge/repos/fledge-pkg
144+
The Fledge directory is : /home/fledge/fledge
145+
The Fledge version is : 1.5.2
146+
The package will be built in : /home/fledge/repos/fledge-pkg/packages/rpmbuild/RPMS/x86_64
147+
The package name is : fledge-1.5.2-1.x86_64
148148
149-
Saving the old working environment as foglamp-1.5.2-1.x86_64.0077
149+
Saving the old working environment as fledge-1.5.2-1.x86_64.0077
150150
Populating the package and updating version in control file...Done.
151151
Prepare data directory
152-
Saving the old package as foglamp-1.5.2-1.x86_64.rpm.0001
152+
Saving the old package as fledge-1.5.2-1.x86_64.rpm.0001
153153
Building the new package...
154-
Processing files: foglamp-1.5.2-1.x86_64
155-
Provides: foglamp = 1.5.2-1 foglamp(x86-64) = 1.5.2-1
154+
Processing files: fledge-1.5.2-1.x86_64
155+
Provides: fledge = 1.5.2-1 fledge(x86-64) = 1.5.2-1
156156
Requires(interp): /bin/sh /bin/sh /bin/sh
157157
Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
158158
Requires(pre): /bin/sh
159159
Requires(post): /bin/sh
160160
Requires(preun): /bin/sh
161-
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/foglamp/repos/foglamp-pkg/packages/rpmbuild/BUILDROOT/foglamp-1.5.2-1.x86_64
162-
Wrote: /home/foglamp/repos/foglamp-pkg/packages/rpmbuild/RPMS/x86_64/foglamp-1.5.2-1.x86_64.rpm
161+
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/fledge/repos/fledge-pkg/packages/rpmbuild/BUILDROOT/fledge-1.5.2-1.x86_64
162+
Wrote: /home/fledge/repos/fledge-pkg/packages/rpmbuild/RPMS/x86_64/fledge-1.5.2-1.x86_64.rpm
163163
Building Complete.
164164
$
165165
@@ -169,39 +169,39 @@ The result will be:
169169
170170
$ ls -l packages/rpmbuild/RPMS/x86_64
171171
total 6444
172-
-rw-rw-r-- 1 foglamp foglamp 6597376 May 10 02:08 foglamp-1.5.2-1.x86_64.rpm
172+
-rw-rw-r-- 1 fledge fledge 6597376 May 10 02:08 fledge-1.5.2-1.x86_64.rpm
173173
$
174174
175175
If you execute the ``make_rpm`` command again, you will see:
176176

177177
.. code-block:: console
178178
179179
$ ./make_rpm
180-
The package root directory is : /home/foglamp/repos/foglamp-pkg
181-
The FogLAMP directory is : /home/foglamp/foglamp
182-
The FogLAMP version is : 1.5.2
183-
The package will be built in : /home/foglamp/repos/foglamp-pkg/packages/rpmbuild/RPMS/x86_64
184-
The package name is : foglamp-1.5.2-1.x86_64
180+
The package root directory is : /home/fledge/repos/fledge-pkg
181+
The Fledge directory is : /home/fledge/fledge
182+
The Fledge version is : 1.5.2
183+
The package will be built in : /home/fledge/repos/fledge-pkg/packages/rpmbuild/RPMS/x86_64
184+
The package name is : fledge-1.5.2-1.x86_64
185185
186-
Saving the old working environment as foglamp-1.5.2-1.x86_64.0079
186+
Saving the old working environment as fledge-1.5.2-1.x86_64.0079
187187
Populating the package and updating version in control file...Done.
188188
Prepare data directory
189-
Saving the old package as foglamp-1.5.2-1.x86_64.rpm.0001
189+
Saving the old package as fledge-1.5.2-1.x86_64.rpm.0001
190190
Building the new package...
191-
Processing files: foglamp-1.5.2-1.x86_64
192-
Provides: foglamp = 1.5.2-1 foglamp(x86-64) = 1.5.2-1
191+
Processing files: fledge-1.5.2-1.x86_64
192+
Provides: fledge = 1.5.2-1 fledge(x86-64) = 1.5.2-1
193193
Requires(interp): /bin/sh /bin/sh /bin/sh
194194
Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
195195
Requires(pre): /bin/sh
196196
Requires(post): /bin/sh
197197
Requires(preun): /bin/sh
198-
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/foglamp/repos/foglamp-pkg/packages/rpmbuild/BUILDROOT/foglamp-1.5.2-1.x86_64
199-
Wrote: /home/foglamp/repos/foglamp-pkg/packages/rpmbuild/RPMS/x86_64/foglamp-1.5.2-1.x86_64.rpm
198+
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/fledge/repos/fledge-pkg/packages/rpmbuild/BUILDROOT/fledge-1.5.2-1.x86_64
199+
Wrote: /home/fledge/repos/fledge-pkg/packages/rpmbuild/RPMS/x86_64/fledge-1.5.2-1.x86_64.rpm
200200
Building Complete.
201201
$ ls -l packages/rpmbuild/RPMS/x86_64
202202
total 12888
203-
-rw-rw-r-- 1 foglamp foglamp 6597420 May 10 02:10 foglamp-1.5.2-1.x86_64.rpm
204-
-rw-rw-r-- 1 foglamp foglamp 6597376 May 10 02:08 foglamp-1.5.2-1.x86_64.rpm.0001
203+
-rw-rw-r-- 1 fledge fledge 6597420 May 10 02:10 fledge-1.5.2-1.x86_64.rpm
204+
-rw-rw-r-- 1 fledge fledge 6597376 May 10 02:08 fledge-1.5.2-1.x86_64.rpm.0001
205205
$
206206
207207
... where the previous build is now marked with the suffix *.0001*.

docker/Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ FROM ubuntu:18.04
22

33
MAINTAINER Vaibhav Singhal "[email protected]"
44

5-
ARG FOGLAMP_BRANCH=master
6-
ENV FOGLAMP_BRANCH ${FOGLAMP_BRANCH}
5+
ARG FLEDGE_BRANCH=master
6+
ENV FLEDGE_BRANCH ${FLEDGE_BRANCH}
77
RUN apt-get update && apt-get -y upgrade
88
RUN apt-get install -y git rsyslog
99

10-
WORKDIR /foglamp-core
10+
WORKDIR /fledge-core
1111

12-
RUN git clone --single-branch -b $FOGLAMP_BRANCH https://github.com/foglamp/FogLAMP.git
12+
RUN git clone --single-branch -b $FLEDGE_BRANCH https://github.com/fledge/Fledge.git
1313

14-
RUN cd FogLAMP && \
14+
RUN cd Fledge && \
1515
chmod +x requirements.sh && \
1616
./requirements.sh && \
1717
make install
1818

1919
RUN echo "service rsyslog start" > start.sh && \
20-
echo "/usr/local/foglamp/bin/foglamp start" >> start.sh && \
20+
echo "/usr/local/fledge/bin/fledge start" >> start.sh && \
2121
echo "tail -f /dev/null" >> start.sh && \
2222
chmod +x start.sh
2323

2424

25-
ENV FOGLAMP_ROOT=/usr/local/foglamp
25+
ENV FLEDGE_ROOT=/usr/local/fledge
2626

27-
VOLUME /usr/local/foglamp/data
27+
VOLUME /usr/local/fledge/data
2828

2929
# These Volumes will be used in future when we want to install plugins
30-
VOLUME /usr/local/foglamp
31-
VOLUME /foglamp-core/FogLAMP
30+
VOLUME /usr/local/fledge
31+
VOLUME /fledge-core/Fledge
3232

3333
EXPOSE 8081 1995
3434

35-
CMD ["bash", "/foglamp-core/start.sh"]
35+
CMD ["bash", "/fledge-core/start.sh"]
3636

docker/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,33 @@ https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/
1919
sudo systemctl daemon-reload
2020
sudo systemctl restart docker
2121
```
22-
### Build foglamp image
22+
### Build fledge image
2323

2424
```
25-
docker build --tag foglamp --build-arg FOGLAMP_BRANCH=develop .
25+
docker build --tag fledge --build-arg FLEDGE_BRANCH=develop .
2626
```
2727

28-
where name of the image is foglamp, FOGLAMP_BRANCH is the branch to build (develop, master, 1.5.2 ,etc)
28+
where name of the image is fledge, FLEDGE_BRANCH is the branch to build (develop, master, 1.5.2 ,etc)
2929

3030
### Run container
3131

3232

3333
```
34-
$ docker run -d -v /foglamp-data:/usr/local/foglamp/data --name foglamp -p 8081:8081 -p 1995:1995 foglamp
34+
$ docker run -d -v /fledge-data:/usr/local/fledge/data --name fledge -p 8081:8081 -p 1995:1995 fledge
3535
```
3636

37-
-d : run foglamp container in detached mode
38-
-v : maps host volume /foglamp-data to container volume /usr/local/foglamp/data
39-
--name : name of the container (foglamp)
37+
-d : run fledge container in detached mode
38+
-v : maps host volume /fledge-data to container volume /usr/local/fledge/data
39+
--name : name of the container (fledge)
4040
-p : map the port of host machine (8081) and container (:8081)
41-
foglamp : name of the image created in earlier step
41+
fledge : name of the image created in earlier step
4242

43-
> To attach to a running conatiner: `docker exec -it foglamp bash`
43+
> To attach to a running conatiner: `docker exec -it fledge bash`
4444
4545

4646
### Stopping docker container
4747
```
48-
$ docker stop foglamp
48+
$ docker stop fledge
4949
```
5050

51-
> Note: The files in foglamp-data directory are created by container which creates/runs them as root user. In order to read the foglamp.db, you need to change the permission of foglamp.db* files, sudo chmod 666 foglamp.db*
51+
> Note: The files in fledge-data directory are created by container which creates/runs them as root user. In order to read the fledge.db, you need to change the permission of fledge.db* files, sudo chmod 666 fledge.db*

make_deb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
set -e
2424

2525
usage="$(basename "$0") [help|clean|cleanall]
26-
This script is used to create the Debian package of FogLAMP
26+
This script is used to create the Debian package of Fledge
2727
Arguments:
2828
help - Display this help text
2929
clean - Remove all the old versions saved in format .XXXX
@@ -66,28 +66,28 @@ do
6666
esac
6767
done
6868

69-
# Check FOGLAMP_ROOT
70-
if [ -z ${FOGLAMP_ROOT+x} ]; then
71-
# Set FOGLAMP_ROOT as the default directory
72-
if [ -d "/usr/local/foglamp" ]; then
73-
FOGLAMP_ROOT="/usr/local/foglamp"
74-
export FOGLAMP_ROOT
69+
# Check FLEDGE_ROOT
70+
if [ -z ${FLEDGE_ROOT+x} ]; then
71+
# Set FLEDGE_ROOT as the default directory
72+
if [ -d "/usr/local/fledge" ]; then
73+
FLEDGE_ROOT="/usr/local/fledge"
74+
export FLEDGE_ROOT
7575
else
76-
echo "No FOGLAMP_ROOT directory found - Program exit."
76+
echo "No FLEDGE_ROOT directory found - Program exit."
7777
exit 1
7878
fi
7979
fi
8080

81-
version=`cat ${FOGLAMP_ROOT}/VERSION | tr -d ' ' | grep 'foglamp_version=' | head -1 | sed -e 's/\(.*\)=\(.*\)/\2/g'`
81+
version=`cat ${FLEDGE_ROOT}/VERSION | tr -d ' ' | grep 'fledge_version=' | head -1 | sed -e 's/\(.*\)=\(.*\)/\2/g'`
8282
BUILD_ROOT="${GIT_ROOT}/packages/Debian/build/${architecture}"
8383

8484
# Final package name
85-
package_name="foglamp-${version}-${architecture}"
85+
package_name="fledge-${version}-${architecture}"
8686

8787
# Print the summary of findings
8888
echo "The package root directory is : ${GIT_ROOT}"
89-
echo "The FogLAMP directory is : ${FOGLAMP_ROOT}"
90-
echo "The FogLAMP version is : ${version}"
89+
echo "The Fledge directory is : ${FLEDGE_ROOT}"
90+
echo "The Fledge version is : ${version}"
9191
echo "The package will be built in : ${BUILD_ROOT}"
9292
echo "The architecture is set as : ${architecture}"
9393
echo "The package name is : ${package_name}"
@@ -118,9 +118,9 @@ cd "${package_name}"
118118
cp -R ${GIT_ROOT}/packages/Debian/common/* .
119119
cp -R ${GIT_ROOT}/packages/Debian/${architecture}/* .
120120
sed -i "s/Version: 1.0.0/Version: ${version}/g" DEBIAN/control
121-
mkdir -p usr/local/foglamp
122-
cd usr/local/foglamp
123-
cp -R ${FOGLAMP_ROOT}/* .
121+
mkdir -p usr/local/fledge
122+
cd usr/local/fledge
123+
cp -R ${FLEDGE_ROOT}/* .
124124
echo "Done."
125125

126126
# Prepare new data directory
@@ -129,14 +129,14 @@ mv data data.new
129129
cd data.new
130130
rm -rf core.err
131131
rm -rf etc/certs/*
132-
rm -rf foglamp.db
132+
rm -rf fledge.db
133133
rm -rf var
134134

135135
# Add customised files
136-
#echo -n "Adding FogLAMP customization..."
136+
#echo -n "Adding Fledge customization..."
137137

138138
#cp -R ${GIT_ROOT}/share/* share/postgresql/.
139-
#cd ${BUILD_ROOT}/${package_name}/usr/local/foglamp/plugins/storage/postgres
139+
#cd ${BUILD_ROOT}/${package_name}/usr/local/fledge/plugins/storage/postgres
140140
#mkdir bin
141141
#cp ${GIT_ROOT}/scripts/* bin/.
142142
#echo "Done."

0 commit comments

Comments
 (0)