-# Build Python Packages and Containers
+# Build Python Packages and Docker Images
## Python Package
-### Get the code
-
+### pre-requist
+Get the code
```bash
git clone https://git.opnfv.org/moon
cd moon/moonv4
sudo ln -s $(pwd)/conf /etc/moon
```
-### Build python packages for all components
+Install python wheel
```bash
-sudo pip3 install pip --upgrade
-cd ${MOON_HOME}/bin
-source build_all.sh
+sudo apt install python3-wheel
```
-### moon_db
+Install pip twine
+```bash
+sudo pip install twine
+```
+Package code, wheel is a new format instead of `tar.gz`
+```bash
+python setup.py sdist bdist_wheel
+```
-### utilities
+Upload to PyPi
+```bash
+twine upload dist/moon_xxx-y.y.y.whl
+twine upload dist/moon_xxx-y.y.y.tar.gz
+```
+Install a package from PyPi
+```bash
+sudo pypi install moon_xxx --upgrade
+```
+
+### moon_db
+- change version in `moon_db/__init__.py`
+- add `Changelog`
+
+### moon_utilities
+- change version in `moon_utilities/__init__.py`
+- add `Changelog`
### moon_orchestrator
+- change version in `moon_orchestrator/__init__.py`
+- add `Changelog`
+
+
+### Build All Pip
+```bash
+sudo pip3 install pip --upgrade
+cd ${MOON_HOME}/bin
+source build_all_pip.sh
+```
## Container
--- /dev/null
+#!/usr/bin/env bash
+
+
+echo Building Moon_DB
+cd $MOON_HOME/moon_db
+python3 setup.py sdist bdist_wheel> /tmp/moon_db.log
+
+
+echo Building Moon_Utilities
+cd $MOON_HOME/moon_utilities
+python3 setup.py sdist bdist_wheel> /tmp/moon_utilities.log
+
+
+echo Building Moon_Orchestrator
+cd $MOON_HOME/moon_orchestrator
+python3 setup.py sdist bdist_wheel> /tmp/moon_orchestrator.log
\ No newline at end of file
-----
- Update setup.py to force the installation of requirements.
+1.0.2
+-----
+- Test PyPi upload
+
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.0.1"
+__version__ = "1.0.2"
--- /dev/null
+# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
+# This software is distributed under the terms and conditions of the 'Apache-2.0'
+# license which can be found in the file 'LICENSE' in this package distribution
+# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
+
+
+CHANGES
+=======
+
+0.1.0
+-----
+- First version of the moon_orchestrator library.
+
+1.0.0
+-----
+- First public version of the moon_orchestrator library.
+
+1.0.1
+-----
+- add Changelog
+
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.0.0"
+__version__ = "1.0.1"
-----
- Update setup.py to force the installation of requirements.
+1.0.2
+-----
+- Test PyPi upload
\ No newline at end of file
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.0.1"
+__version__ = "1.0.2"
```
-## set up an execution environment
+## Setup an execution environment
### clean up if necessary
```bash