-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use external config and network files and some improvments
Signed-off-by: Mohammed Boukhalfa <[email protected]>
- Loading branch information
1 parent
4e42ef5
commit fa61478
Showing
27 changed files
with
32 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ share/python-wheels/ | |
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
MANIFEST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
ARG BASE_IMAGE=python:3.9-slim | ||
FROM $BASE_IMAGE | ||
ENV PBR_VERSION=6.0.0 | ||
COPY . /root/fake-ipa/ | ||
WORKDIR /root/fake-ipa/ | ||
ENV CONFIG ${CONFIG:-/root/fake-ipa/conf.py} | ||
RUN python3 -m pip install -r requirements.txt | ||
RUN python3 setup.py install | ||
CMD fake-ipa --config $CONFIG | ||
COPY . /app/ | ||
WORKDIR /app/ | ||
ENV CONFIG ${CONFIG:-/app/conf.py} | ||
RUN python3 -m pip install . -r requirements.txt | ||
CMD fake-ipa --config "${CONFIG}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,19 @@ | ||
# Fake ironic python agent | ||
# Fake Ironic Python Agent | ||
|
||
Fake ipa is a tool to help test ironic communication with IPA. | ||
FakeIPA is a tool to help test ironic communication with IPA. | ||
|
||
Fake ipa simulate the IPA by: | ||
FakeIPA simulate the IPA by: | ||
|
||
- Running an API server with the needed real IPA endpoint. | ||
- Send back fake inspection data when requested. | ||
- lookup the node and save tokens. | ||
- Heartbeating to ironic API with several threads looping over | ||
- Lookup the node and save tokens. | ||
- Heartbeating to Ironic API with several threads looping over | ||
a queue of fake agents. | ||
- Faking the sync/async commands needed by ironic to inspect, | ||
clean and provision a node. | ||
|
||
## Run Fake ipa with ironic | ||
## Run FakeIPA | ||
|
||
### Requirements | ||
|
||
Machine: `4c / 16gb / 100gb` | ||
OS: `CentOS9-20220330` | ||
|
||
### Test fake ipa | ||
|
||
1. clone the env scripts `cd` inside `fake-ipa/Run-env` folder | ||
2. check configs in `config.py` | ||
3. run init `./Init-environment.sh` | ||
4. to just rebuild fake-ipa from the local repo run `./rebuild-fipa.sh` | ||
|
||
### Use ironic with fake-ipa | ||
|
||
At this step there will be an ironic environment using fake-ipa, | ||
by default there will be two nodes created on ironic you can list them with: | ||
`baremetal node list` | ||
|
||
To manage the a node using the ironicclient: | ||
`baremetal node manage <node-name>` | ||
|
||
To inspect use: `baremetal node inspect <node-name>` | ||
then you can provide and deploy image on the node with: | ||
|
||
```bash | ||
baremetal node provide <node-name> | ||
baremetal node deploy <node-name> | ||
``` | ||
|
||
### Clean | ||
|
||
To clean the env `./clean.sh` | ||
Dev-env provide an environment where we can test FakeIPA | ||
Check WIP PR for more details: | ||
<https://github.com/metal3-io/metal3-dev-env/pull/1450> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.