Create initial repo structure
This change creates initial repo structure with some dummy
scripts and playbooks in order to ensure the Jenkins jobs
verifying the changes coming to the repo do not complain.
The dummy scripts and playbooks will be replaced with the
real ones over time in subsequent changes.
Change-Id: I28d0c1db3112aec04b6127b802c472348e8e2481
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9a27f6a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,65 @@
+# Packages
+# it's better to unpack these files and commit the raw source
+# git has its own built in compression methods
+*.7z
+*.dmg
+*.gz
+*.iso
+*.jar
+*.rar
+*.tar
+*.zip
+
+# OS generated files
+.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+ehthumbs.db
+Thumbs.db
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+.venv
+venv/
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+
+# Logs and other temporary files
+*.log
+*.retry
+*.swp
+
+# track these files, if they exist
+!.gitignore
+
+# engine temporary files
+engine/inventory/inventory.ini
+engine/inventory/bifrost_inventory.py
+engine/inventory/group_vars/all/pdf.yaml
+engine/inventory/group_vars/all/idf.yaml
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..55fa047
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.nordix.org
+port=29418
+project=infra/stack/ironic.git
+defaultbranch=master
diff --git a/.yamllint b/.yamllint
new file mode 100644
index 0000000..fb924d7
--- /dev/null
+++ b/.yamllint
@@ -0,0 +1,32 @@
+---
+yaml-files:
+ - '*.yaml'
+ - '*.yml'
+ - '.yamllint'
+
+rules:
+ braces: enable
+ brackets: enable
+ colons: enable
+ commas: enable
+ comments:
+ level: warning
+ comments-indentation:
+ level: warning
+ document-end: disable
+ document-start:
+ level: warning
+ empty-lines: enable
+ empty-values: disable
+ hyphens: enable
+ indentation: enable
+ key-duplicates: enable
+ key-ordering: disable
+ line-length: disable
+ new-line-at-end-of-file: enable
+ new-lines: enable
+ octal-values: disable
+ quoted-strings: disable
+ trailing-spaces: enable
+ truthy:
+ level: error
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..5c26402
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+echo "Hello World!"
+
+# vim: set ts=2 sw=2 expandtab:
diff --git a/package.sh b/package.sh
new file mode 100755
index 0000000..881fd41
--- /dev/null
+++ b/package.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+echo "Hello World!"
+
+# NOTE (fdegir): this dummy file is created in order to ensure artifact upload
+# and downlad functionality of jenkins verify jobs do not complain, causing
+# failures during verification
+uname -an > /tmp/ironic-ubuntu1804.bsx
+
+# vim: set ts=2 sw=2 expandtab:
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..1c180ac
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,15 @@
+[metadata]
+name = engine
+summary = An automation framework
+description-file =
+ README.md
+author = Nordix Infra
+author-email = infra@nordix.org
+home-page = https://www.nordix.org/
+classifier =
+ Environment :: Cloud Infra
+ Intended Audience :: Information Technology
+ Intended Audience :: System Administrators
+ License :: OSI Approved :: Apache Software License
+ Operating System :: POSIX :: Linux
+ Programming Language :: Python
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..566d844
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,29 @@
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
+import setuptools
+
+# In python < 2.7.4, a lazy loading of package `pbr` will break
+# setuptools if some other modules registered functions in `atexit`.
+# solution from: http://bugs.python.org/issue15881#msg170215
+try:
+ import multiprocessing # noqa
+except ImportError:
+ pass
+
+setuptools.setup(
+ setup_requires=['pbr>=2.0.0'],
+ pbr=True)
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..13213c7
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,10 @@
+#-------------------------------------------------------------------------------
+# This file contains engine python requirement version pins.
+# Changing versions might have side effects!
+#-------------------------------------------------------------------------------
+
+# NOTE: engine test requirements
+tox==3.14.3
+ansible-lint==4.1.0
+yamllint==1.19.0
+shellcheck-py==0.7.0.1
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..c085ead
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,38 @@
+[tox]
+basepython = py36
+minversion = 2.5
+skipsdist = true
+envlist = ansible-lint, shellcheck, yamllint, docs
+install_command = pip install --force-reinstall {opts} {packages}
+deps = -r{toxinidir}/test-requirements.txt
+
+[testenv:ansible-lint]
+description = invoke ansible-lint to analyse Ansible playbooks and roles
+deps = -r{toxinidir}/test-requirements.txt
+whitelist_externals = bash
+# TODO (fdegir): upstream bifrost file bootstrap.yml in install-configure-bifrost/file
+# excluded from ansible-lint since we can't fix issues in them and they will disappear
+# one they are fixed in upstream
+commands =
+ bash -c "find {toxinidir} -type f -regex '.*.ya?ml' \
+ ! -regex '.*.tox.*\|.*.venv.*' \
+ -print0 | xargs -t -n1 -0 ansible-lint --nocolor"
+
+[testenv:yamllint]
+description = invoke yamllint to analyse YAML files
+deps = -r{toxinidir}/test-requirements.txt
+whitelist_externals = bash
+commands =
+ bash -c "find {toxinidir} -type f -regex '.*.ya?ml' \
+ ! -regex '.*.tox.*\|.*.venv.*' \
+ -print0 | xargs -t -n1 -0 yamllint --format standard --strict"
+
+[testenv:shellcheck]
+description = invoke shellcheck to analyse bash shell scripts
+deps = -r{toxinidir}/test-requirements.txt
+whitelist_externals = bash
+commands =
+ bash -c "find {toxinidir} -type f -regex '.*.sh' \
+ ! -regex '.*.tox.*\|.*.venv.*' \
+ -print0 | xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir} \
+ --external-sources --format=tty"
diff --git a/vars/ironic.yaml b/vars/ironic.yaml
new file mode 100644
index 0000000..06e5272
--- /dev/null
+++ b/vars/ironic.yaml
@@ -0,0 +1,5 @@
+---
+
+# NOTE (fdegir): this yaml file is created in order to setup the
+# basic repo structure. actual content will be populated in subsequent
+# changes