aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/terraform-aws-2n-c7gn/main.tf
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2023-12-12 12:10:00 +0000
committerpmikus <peter.mikus@protonmail.ch>2023-12-12 13:09:06 +0000
commit76b132e25f228918b78812aea0a8d4fe5bf79501 (patch)
treef9ce9647bddd32a39d847f98f8ce49850343aeae /fdio.infra.terraform/terraform-aws-2n-c7gn/main.tf
parent21ce2e82737ddb8fa8d23e7a9a7714caa8fc1e01 (diff)
feat(terraform): Remove ansible dependency
- terraform ansible is not supported on aarch Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch> Change-Id: I3d1a592b4ed97fe635813dccbf78dc42d14e0fa9
Diffstat (limited to 'fdio.infra.terraform/terraform-aws-2n-c7gn/main.tf')
-rw-r--r--fdio.infra.terraform/terraform-aws-2n-c7gn/main.tf48
1 files changed, 28 insertions, 20 deletions
diff --git a/fdio.infra.terraform/terraform-aws-2n-c7gn/main.tf b/fdio.infra.terraform/terraform-aws-2n-c7gn/main.tf
index 3fd3012192..5711d7389e 100644
--- a/fdio.infra.terraform/terraform-aws-2n-c7gn/main.tf
+++ b/fdio.infra.terraform/terraform-aws-2n-c7gn/main.tf
@@ -298,30 +298,38 @@ resource "null_resource" "deploy_sut1" {
}
}
-resource "null_resource" "deploy_topology" {
+resource "local_file" "topology_file" {
depends_on = [
aws_instance.tg,
aws_instance.sut1
]
- provisioner "ansible" {
- plays {
- playbook {
- file_path = var.ansible_topology_path
- }
- hosts = ["local"]
- extra_vars = {
- ansible_python_interpreter = local.ansible_python_executable
- testbed_name = local.testbed_name
- cloud_topology = local.topology_name
- tg_if1_mac = data.aws_network_interface.tg_if1.mac_address
- tg_if2_mac = data.aws_network_interface.tg_if2.mac_address
- dut1_if1_mac = data.aws_network_interface.sut1_if1.mac_address
- dut1_if2_mac = data.aws_network_interface.sut1_if2.mac_address
- tg_public_ip = aws_instance.tg.public_ip
- dut1_public_ip = aws_instance.sut1.public_ip
- public_ip_list = "${aws_instance.tg.public_ip},${aws_instance.sut1.public_ip}"
- }
+ content = templatefile(
+ "${path.module}/topology-${local.topology_name}.tftpl",
+ {
+ tg_if1_mac = data.aws_network_interface.tg_if1.mac_address
+ tg_if2_mac = data.aws_network_interface.tg_if2.mac_address
+ dut1_if1_mac = data.aws_network_interface.sut1_if1.mac_address
+ dut1_if2_mac = data.aws_network_interface.sut1_if2.mac_address
+ tg_public_ip = aws_instance.tg.public_ip
+ dut1_public_ip = aws_instance.sut1.public_ip
}
- }
+ )
+ filename = "${path.module}/../../topologies/available/${local.topology_name}-${local.testbed_name}.yaml"
}
+
+resource "local_file" "hosts" {
+ depends_on = [
+ aws_instance.tg,
+ aws_instance.sut1
+ ]
+
+ content = templatefile(
+ "${path.module}/hosts.tftpl",
+ {
+ tg_public_ip = aws_instance.tg.public_ip
+ dut1_public_ip = aws_instance.sut1.public_ip
+ }
+ )
+ filename = "${path.module}/../../fdio.infra.ansible/inventories/cloud_inventory/hosts.yaml"
+} \ No newline at end of file
hlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
.. raw:: latex

    \clearpage

.. raw:: html

    <script type="text/javascript">

        function getDocHeight(doc) {
            doc = doc || document;
            var body = doc.body, html = doc.documentElement;
            var height = Math.max( body.scrollHeight, body.offsetHeight,
                html.clientHeight, html.scrollHeight, html.offsetHeight );
            return height;
        }

        function setIframeHeight(id) {
            var ifrm = document.getElementById(id);
            var doc = ifrm.contentDocument? ifrm.contentDocument:
                ifrm.contentWindow.document;
            ifrm.style.visibility = 'hidden';
            ifrm.style.height = "10px"; // reset to minimal height ...
            // IE opt. for bing/msn needs a bit added or scrollbar appears
            ifrm.style.height = getDocHeight( doc ) + 4 + "px";
            ifrm.style.visibility = 'visible';
        }

    </script>

2n-skx-xxv710
~~~~~~~~~~~~~

64b-2t1c-base_and_scale
-----------------------

.. raw:: html

    <center><b>

:index:`Packet Latency: memif-2n-skx-xxv710-64b-2t1c-base_and_scale-ndr`

.. raw:: html

    </b>
    <iframe id="ifrm11" onload="setIframeHeight(this.id)" width="700" frameborder="0" scrolling="no" src="../../_static/vpp/memif-2n-skx-xxv710-64b-2t1c-base_and_scale-ndr-lat.html"></iframe>
    <p><br><br></p>
    </center>

.. raw:: latex

    \begin{figure}[H]
        \centering
            \graphicspath{{../_build/_static/vpp/}}
            \includegraphics[clip, trim=0cm 0cm 5cm 0cm, width=0.70\textwidth]{memif-2n-skx-xxv710-64b-2t1c-base_and_scale-ndr-lat}
            \label{fig:memif-2n-skx-xxv710-64b-2t1c-base_and_scale-ndr-lat}
    \end{figure}

.. raw:: latex

    \clearpage

64b-4t2c-base_and_scale
-----------------------

.. raw:: html

    <center><b>

:index:`Packet Latency: memif-2n-skx-xxv710-64b-4t2c-base_and_scale-ndr`

.. raw:: html

    </b>
    <iframe id="ifrm12" onload="setIframeHeight(this.id)" width="700" frameborder="0" scrolling="no" src="../../_static/vpp/memif-2n-skx-xxv710-64b-4t2c-base_and_scale-ndr-lat.html"></iframe>
    <p><br><br></p>
    </center>

.. raw:: latex

    \begin{figure}[H]
        \centering
            \graphicspath{{../_build/_static/vpp/}}
            \includegraphics[clip, trim=0cm 0cm 5cm 0cm, width=0.70\textwidth]{memif-2n-skx-xxv710-64b-4t2c-base_and_scale-ndr-lat}
            \label{fig:memif-2n-skx-xxv710-64b-4t2c-base_and_scale-ndr-lat}
    \end{figure}