BAEL-1175 - Using a Spring Cloud App Starter Bash
This commit is contained in:
parent
e271fa0c63
commit
f55bd014f9
|
@ -19,3 +19,4 @@
|
|||
### Relevant Articles:
|
||||
- [Introduction to Spring Cloud Rest Client with Netflix Ribbon](http://www.baeldung.com/spring-cloud-rest-client-with-netflix-ribbon)
|
||||
[An Introduction to Spring Cloud Zookeeper](http://www.baeldung.com/spring-cloud-zookeeper)
|
||||
[Using a Spring Cloud App Starter](http://www.baeldung.com/using-a-spring-cloud-app-starter)
|
|
@ -0,0 +1,42 @@
|
|||
# For Ubuntu 14.04
|
||||
# Inspired from: https://github.com/curran/setupHadoop/blob/master/setupHadoop.sh
|
||||
# Use from the user directory
|
||||
|
||||
# Install Java
|
||||
sudo apt-get update
|
||||
sudo add-apt-repository -y ppa:webupd8team/java
|
||||
sudo apt-get install -y oracle-java8-installer
|
||||
|
||||
# Install Hadoop
|
||||
curl -O http://mirror.cogentco.com/pub/apache/hadoop/common/hadoop-2.8.2/hadoop-2.8.2.tar.gz
|
||||
tar xfz hadoop-2.8.2.tar.gz
|
||||
sudo mv hadoop-2.8.2 /usr/local/hadoop
|
||||
rm hadoop-2.8.2.tar.gz
|
||||
|
||||
# Environmental Variables
|
||||
echo export JAVA_HOME=/usr/lib/jvm/java-8-oracle >> ~/.bashrc
|
||||
echo export HADOOP_PREFIX=/usr/local/hadoop >> ~/.bashrc
|
||||
echo export PATH=\$PATH:/usr/local/hadoop/bin >> ~/.bashrc
|
||||
echo export PATH=\$PATH:/usr/local/hadoop/sbin >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
# Copy configuration files
|
||||
cp master/* /usr/local/hadoop/etc/hadoop/
|
||||
|
||||
# Format HDFS
|
||||
hdfs namenode -format
|
||||
|
||||
# SSH keys for Hadoop to use.
|
||||
ssh-keygen -t rsa -P 'password' -f ~/.ssh/id_rsa.pub
|
||||
sudo mv ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
|
||||
|
||||
# SSH
|
||||
ssh localhost
|
||||
# Authenticate with local user
|
||||
|
||||
# Start NameNode daemon and DataNode daemon
|
||||
start-dfs.sh
|
||||
# stop-dfs.sh
|
||||
|
||||
# Install Maven
|
||||
sudo apt-get install maven
|
|
@ -0,0 +1 @@
|
|||
hdfs.fs-uri=http://osboxes:50075
|
|
@ -0,0 +1,14 @@
|
|||
# Git spring-cloud-stream-app-starters
|
||||
git clone https://github.com/spring-cloud/spring-cloud-stream-app-starters.git
|
||||
|
||||
# Navigate to HDFS
|
||||
cd /hdfs
|
||||
|
||||
# Navigate to the the app configuration settings
|
||||
cd /spring-cloud-starter-stream-sink-hdfs/src/main/java/org/springframework/cloud/stream/app/hdfs/sink/HdfsSinkProperties.java
|
||||
# Specify the properties you want there
|
||||
# or inject the application.properties file before building the app
|
||||
|
||||
# Then build the customized starter app
|
||||
cd ../../../../../../../../../../../../../
|
||||
mvn clean install
|
|
@ -0,0 +1,4 @@
|
|||
twitter.credentials.access-token=932486336086286336-2HURQbA2cYzX5hixgAshIBy2Dhefupn
|
||||
twitter.credentials.access-token-secret=0pyZ7etHvro8x85QSXxsqYFzYk63bK6DS5nNYy0R3l1io
|
||||
twitter.credentials.consumer-key=10xCXkRYi5xLFYq3P0ymWGEwJ
|
||||
twitter.credentials.consumer-secret=VfyCUcGfAQ2aWcd3uTg8GmVGyhUfAcNJU6ksG09TAtPMqhmWTS
|
|
@ -0,0 +1,15 @@
|
|||
# Git spring-cloud-stream-app-starters
|
||||
git clone https://github.com/spring-cloud/spring-cloud-stream-app-starters.git
|
||||
|
||||
# Navigate to Twitter
|
||||
cd /twitter
|
||||
|
||||
# Navigate to the the app configuration settings
|
||||
cd /spring-cloud-starter-stream-source-twitterstream/src/main/java/org/springframework/cloud/stream/app/twitterstream/source/TwitterStreamProperties.java
|
||||
cd /spring-cloud-stream-app-starters/app-starters-common/app-starters-twitter-common/src/main/java/org/springframework/cloud/stream/app/twitter/TwitterCredentials.java
|
||||
# Specify the properties you want there
|
||||
# or inject the application.properties file before building the app
|
||||
|
||||
# Then build the customized starter app
|
||||
cd ../../../../../../../../../../../../
|
||||
mvn clean install
|
Loading…
Reference in New Issue