blob: b490eae7b31660356c6bfcb3e69a68798e277461 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-1382082-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-61232409-1');
</script>
<meta charset="UTF-8">
<title>Amazon S3 IP Finder | Ignite Documentation</title>
<link rel="canonical" href="/docs/aws/aws" />
<link rel="stylesheet" href="/assets/css/styles.css?1658382975">
<link rel="stylesheet" href="/assets/css/asciidoc-pygments.css">
<link rel="shortcut icon" href="/favicon.ico">
<meta name='viewport' content='width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0'>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="/assets/js/jquery.swiftype.autocomplete.js?1658382975"></script>
<script type="text/javascript" src="/assets/js/anchor.min.js?1658382975"></script>
</head>
<body>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<header>
<!--#include virtual="/includes/promotion_banner.html" -->
<div class="container">
<button type='button' class='menu' title='Docs menu'>
<img src="{{'assets/images/menu-icon.svg'|relative_url}}" width="18" height="12" alt="menu icon" />
</button>
<div class='home'>
<a href="/" class='home' title='Apache Ignite home'>
<img src="{{'assets/images/apache_ignite_logo.svg'|relative_url}}" alt="Apache Ignite logo" width="103" height="36" >
</a>
</div>
<form class='search'>
<button class="search-close" type='button'><img src='{{"assets/images/cancel.svg"|relative_url}}' alt="close" width="10" height="10" /></button>
<input type="search" placeholder="Search…" id="search-input">
</form>
<button type='button' class='top-nav-toggle'></button>
</div>
</header>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<link rel="stylesheet" href="/assets/css/docs.css">
<section class='page-docs'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<nav class='left-nav' data-swiftype-index='false'>
<li>
<a href="/docs/extensions/aws/aws" class=''>Amazon S3 IP Finder</a>
</li>
<li>
<a href="/docs/extensions/camel/camel-streamer" class=''>Apache Camel Streamer</a>
</li>
<li>
<a href="/docs/extensions/flink/flink-streamer" class=''>Apache Flink Streamer</a>
</li>
<li>
<a href="/docs/extensions/flume/flume-sink" class=''>Apache Flume Sink</a>
</li>
<li>
<a href="/docs/extensions/azure/azure" class=''>Apache Ignite Azure Module</a>
</li>
<li>
<a href="/docs/extensions/gce/gce" class=''>Apache Ignite GCE Module</a>
</li>
<li>
<a href="/docs/extensions/pub-sub/pub-sub" class=''>Apache Ignite Pub/Sub Module</a>
</li>
<li>
<a href="/docs/extensions/spring/spring-boot" class=''>Apache Ignite and Spring Boot</a>
</li>
<li>
<a href="/docs/extensions/spring/spring-data" class=''>Apache Ignite and Spring Data</a>
</li>
<li>
<a href="/docs/extensions/spring/spring-caching" class=''>Apache Ignite and Spring Cache</a>
</li>
<li>
<a href="/docs/extensions/spring/spring-sessions" class=''>Apache Ignite and Spring Session</a>
</li>
<li>
<a href="/docs/extensions/spring/spring-tx" class=''>Apache Ignite and Spring Transactions</a>
</li>
<li>
<a href="/docs/extensions/kafka/kafka-streamer" class=''>Apache Kafka Streamer</a>
</li>
<li>
<a href="/docs/extensions/storm/storm-streamer" class=''>Apache Storm Streamer</a>
</li>
<li>
<a href="/docs/extensions/cdc/change-data-capture-extensions" class=''>Change Data Capture Extension</a>
</li>
<li>
<a href="/docs/extensions/jms/jms-streamer" class=''>JMS Streamer</a>
</li>
<li>
<a href="/docs/extensions/mqtt/mqtt-streamer" class=''>MQTT Streamer</a>
</li>
<li>
<a href="/docs/extensions/perf-statistics/performance-statistics" class=''>Performance Statistics Extension</a>
</li>
<li>
<a href="/docs/extensions/rocketmq/rocketmq-streamer" class=''>RocketMQ Streamer</a>
</li>
<li>
<a href="/docs/extensions/topology-validator/topology-validator" class=''>Topology Validator</a>
</li>
<li>
<a href="/docs/extensions/twitter/twitter-streamer" class=''>Twitter Streamer</a>
</li>
<li>
<a href="/docs/extensions/zeromq/zeromq-streamer" class=''>ZeroMQ Streamer</a>
</li>
<li>
<a href="/docs/extensions/zookeeper/zookeeper-ip" class=''>ZooKeeper IP Finder</a>
</li>
</nav>
<div class="left-nav__overlay"></div>
<article data-swiftype-index='true'>
<a class='edit-link' href="/_docs/aws/aws.adoc" target="_blank">Edit</a>
<h1>Amazon S3 IP Finder</h1>
<div class="paragraph">
<p>Amazon S3-based discovery allows Ignite nodes to register their IP addresses on start-up in an Amazon S3 store.
This way other nodes can try to connect to any of the IP addresses stored in S3 and initiate automatic node discovery.
To use S3 based automatic node discovery, you need to configure the <code>TcpDiscoveryS3IpFinder</code> type of <code>ipFinder</code>.</p>
</div>
<div class="paragraph">
<p>Here is an example of how to configure Amazon S3 based IP finder:</p>
</div>
<code-tabs><code-tab data-tab='XML'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="xml"><span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.configuration.IgniteConfiguration"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"discoverySpi"</span><span class="nt">&gt;</span>
<span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"ipFinder"</span><span class="nt">&gt;</span>
<span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"awsCredentials"</span> <span class="na">ref=</span><span class="s">"aws.creds"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"bucketName"</span> <span class="na">value=</span><span class="s">"YOUR_BUCKET_NAME"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/bean&gt;</span>
<span class="nt">&lt;/property&gt;</span>
<span class="nt">&lt;/bean&gt;</span>
<span class="nt">&lt;/property&gt;</span>
<span class="nt">&lt;/bean&gt;</span>
<span class="c">&lt;!-- AWS credentials. Provide your access key ID and secret access key. --&gt;</span>
<span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">"aws.creds"</span> <span class="na">class=</span><span class="s">"com.amazonaws.auth.BasicAWSCredentials"</span><span class="nt">&gt;</span>
<span class="nt">&lt;constructor-arg</span> <span class="na">value=</span><span class="s">"YOUR_ACCESS_KEY_ID"</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;constructor-arg</span> <span class="na">value=</span><span class="s">"YOUR_SECRET_ACCESS_KEY"</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;/bean&gt;</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='Java'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="java"><span class="nc">TcpDiscoverySpi</span> <span class="n">spi</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">TcpDiscoverySpi</span><span class="o">();</span>
<span class="nc">BasicAWSCredentials</span> <span class="n">creds</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">BasicAWSCredentials</span><span class="o">(</span><span class="s">"yourAccessKey"</span><span class="o">,</span> <span class="s">"yourSecreteKey"</span><span class="o">);</span>
<span class="nc">TcpDiscoveryS3IpFinder</span> <span class="n">ipFinder</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">TcpDiscoveryS3IpFinder</span><span class="o">();</span>
<span class="n">ipFinder</span><span class="o">.</span><span class="na">setAwsCredentials</span><span class="o">(</span><span class="n">creds</span><span class="o">);</span>
<span class="n">ipFinder</span><span class="o">.</span><span class="na">setBucketName</span><span class="o">(</span><span class="s">"yourBucketName"</span><span class="o">);</span>
<span class="n">spi</span><span class="o">.</span><span class="na">setIpFinder</span><span class="o">(</span><span class="n">ipFinder</span><span class="o">);</span>
<span class="nc">IgniteConfiguration</span> <span class="n">cfg</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">IgniteConfiguration</span><span class="o">();</span>
<span class="c1">// Override default discovery SPI.</span>
<span class="n">cfg</span><span class="o">.</span><span class="na">setDiscoverySpi</span><span class="o">(</span><span class="n">spi</span><span class="o">);</span>
<span class="c1">// Start a node.</span>
<span class="nc">Ignition</span><span class="o">.</span><span class="na">start</span><span class="o">(</span><span class="n">cfg</span><span class="o">);</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='C#/.NET' data-unavailable='true'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code>This API is not presently available for C#/.NET. You can use XML configuration.</code></pre>
</div>
</div></code-tab><code-tab data-tab='C++' data-unavailable='true'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code>This API is not presently available for C++. You can use XML configuration.</code></pre>
</div>
</div></code-tab></code-tabs>
<div class="paragraph">
<p>You can also use <strong>Instance Profile</strong> for AWS credentials provider.</p>
</div>
<code-tabs><code-tab data-tab='XML'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="xml"><span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.configuration.IgniteConfiguration"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"discoverySpi"</span><span class="nt">&gt;</span>
<span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"ipFinder"</span><span class="nt">&gt;</span>
<span class="nt">&lt;bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder"</span><span class="nt">&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"awsCredentialsProvider"</span> <span class="na">ref=</span><span class="s">"aws.creds"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"bucketName"</span> <span class="na">value=</span><span class="s">"YOUR_BUCKET_NAME"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/bean&gt;</span>
<span class="nt">&lt;/property&gt;</span>
<span class="nt">&lt;/bean&gt;</span>
<span class="nt">&lt;/property&gt;</span>
<span class="nt">&lt;/bean&gt;</span>
<span class="c">&lt;!-- Instance Profile based credentials --&gt;</span>
<span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">"aws.creds"</span> <span class="na">class=</span><span class="s">"com.amazonaws.auth.InstanceProfileCredentialsProvider"</span><span class="nt">&gt;</span>
<span class="nt">&lt;constructor-arg</span> <span class="na">value=</span><span class="s">"false"</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;/bean&gt;</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='Java'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="java"><span class="nc">TcpDiscoverySpi</span> <span class="n">spi</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">TcpDiscoverySpi</span><span class="o">();</span>
<span class="nc">AWSCredentialsProvider</span> <span class="n">instanceProfileCreds</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">InstanceProfileCredentialsProvider</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
<span class="nc">TcpDiscoveryS3IpFinder</span> <span class="n">ipFinder</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">TcpDiscoveryS3IpFinder</span><span class="o">();</span>
<span class="n">ipFinder</span><span class="o">.</span><span class="na">setAwsCredentialsProvider</span><span class="o">(</span><span class="n">instanceProfileCreds</span><span class="o">);</span>
<span class="n">ipFinder</span><span class="o">.</span><span class="na">setBucketName</span><span class="o">(</span><span class="s">"yourBucketName"</span><span class="o">);</span>
<span class="n">spi</span><span class="o">.</span><span class="na">setIpFinder</span><span class="o">(</span><span class="n">ipFinder</span><span class="o">);</span>
<span class="nc">IgniteConfiguration</span> <span class="n">cfg</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">IgniteConfiguration</span><span class="o">();</span>
<span class="c1">// Override default discovery SPI.</span>
<span class="n">cfg</span><span class="o">.</span><span class="na">setDiscoverySpi</span><span class="o">(</span><span class="n">spi</span><span class="o">);</span>
<span class="c1">// Start a node.</span>
<span class="nc">Ignition</span><span class="o">.</span><span class="na">start</span><span class="o">(</span><span class="n">cfg</span><span class="o">);</span></code></pre>
</div>
</div></code-tab><code-tab data-tab='C#/.NET' data-unavailable='true'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code>This API is not presently available for C#/.NET. You can use XML configuration.</code></pre>
</div>
</div></code-tab><code-tab data-tab='C++' data-unavailable='true'><div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code>This API is not presently available for C++. You can use XML configuration.</code></pre>
</div>
</div></code-tab></code-tabs>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<div class="copyright">
© 2022 The Apache Software Foundation.<br/>
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.
</div>
</article>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<nav class="right-nav" data-swiftype-index='false'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<footer>
</footer>
</nav>
</section>
<script type='module' src='/assets/js/code-copy-to-clipboard.js' async></script>
<script>
// inits deep anchors -- needs to be done here because of https://www.bryanbraun.com/anchorjs/#dont-run-it-too-late
anchors.add('.page-docs h1, .page-docs h2, .page-docs h3:not(.discrete), .page-docs h4, .page-docs h5');
anchors.options = {
placement: 'right',
visible: 'always'
};
</script>
</body>
<script type='module' src='/assets/js/index.js?1658382975' async></script>
</html>