use of org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder in project ignite by apache.
the class DiscoveryInTheCloud method awsExample1.
public static void awsExample1() {
// tag::aws1[]
TcpDiscoverySpi spi = new TcpDiscoverySpi();
BasicAWSCredentials creds = new BasicAWSCredentials("yourAccessKey", "yourSecreteKey");
TcpDiscoveryS3IpFinder ipFinder = new TcpDiscoveryS3IpFinder();
ipFinder.setAwsCredentials(creds);
ipFinder.setBucketName("yourBucketName");
spi.setIpFinder(ipFinder);
IgniteConfiguration cfg = new IgniteConfiguration();
// Override default discovery SPI.
cfg.setDiscoverySpi(spi);
// Start a node.
Ignition.start(cfg);
// end::aws1[]
}
use of org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder in project ignite by apache.
the class DiscoveryInTheCloud method awsExample2.
public static void awsExample2() {
// tag::aws2[]
TcpDiscoverySpi spi = new TcpDiscoverySpi();
AWSCredentialsProvider instanceProfileCreds = new InstanceProfileCredentialsProvider(false);
TcpDiscoveryS3IpFinder ipFinder = new TcpDiscoveryS3IpFinder();
ipFinder.setAwsCredentialsProvider(instanceProfileCreds);
ipFinder.setBucketName("yourBucketName");
spi.setIpFinder(ipFinder);
IgniteConfiguration cfg = new IgniteConfiguration();
// Override default discovery SPI.
cfg.setDiscoverySpi(spi);
// Start a node.
Ignition.start(cfg);
// end::aws2[]
}
Aggregations